How can i model the following data :
- "Person A" was hired by "Studio 1" to act in "Movie A"
- "Person A" was hired by "Studio 1" to act in "Movie B"
- "Person A" was hired by "Studio 1" to act in "Movie C"
- "Person A" was hired by "Studio 2" to act in "Movie X"
- "Person A" was hired by "Studio 2" to act in "Movie Y"
- "Person A" was hired by "Studio 2" to act in "Movie Z"
and then answer the question : "Person A" was hired by "Studio 1" to act in which Movies ? or find the Movies that "Person A" acted in and that was hired by "Studio 1" ?
i have used following :
1. CREATE (s1:Studio {name: 'Studio A'}),(s2:Studio {name: 'Studio B'})
2. CREATE (p:Actor {name: 'Person A'})
3. CREATE (m1:Movie {name:'Movie A'}),(m2:Movie {name:'Movie B'}),(m3:Movie {name:'Movie C'})
4. CREATE (m4:Movie {name:'Movie X'}),(m5:Movie {name:'Movie Y'}),(m6:Movie {name:'Movie Z'})
1. MATCH (A:Actor {name: 'Person A'}),(S:Studio {name: 'Studio A'}),(M:Movie {name: 'Movie A'})
MERGE (S)-[:HIRE]->(A)-[:ACT]->(M)
2. MATCH (A:Actor {name: 'Person A'}),(S:Studio {name: 'Studio A'}),(M:Movie {name: 'Movie B'})
MERGE (S)-[:HIRE]->(A)-[:ACT]->(M)
3. MATCH (A:Actor {name: 'Person A'}),(S:Studio {name: 'Studio A'}),(M:Movie {name: 'Movie C'})
MERGE (S)-[:HIRE]->(A)-[:ACT]->(M)
1. MATCH (A:Actor {name: 'Person A'}),(S:Studio {name: 'Studio B'}),(M:Movie {name: 'Movie X'})
MERGE (S)-[:HIRE]->(A)-[:ACT]->(M)
2. MATCH (A:Actor {name: 'Person A'}),(S:Studio {name: 'Studio B'}),(M:Movie {name: 'Movie Y'})
MERGE (S)-[:HIRE]->(A)-[:ACT]->(M)
3. MATCH (A:Actor {name: 'Person A'}),(S:Studio {name: 'Studio B'}),(M:Movie {name: 'Movie Z'})
MERGE (S)-[:HIRE]->(A)-[:ACT]->(M)
But i can not seem to be able find all the movies that "Person A" acted in and that was hired by "Studio A"