Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. (ingredient)-[:IS_PART_OF]->(recipe)
  2.  
  3. MATCH (recipe:RECIPE{ ID: 1000000 }),(other)
  4. WHERE (other.ID >= 1000001 AND other.ID <= 1057690)
  5. OPTIONAL MATCH (recipe:RECIPE)<-[:IS_PART_OF]-(ingredient:INGREDIENT)- [:IS_PART_OF]->(other)
  6. WITH ingredient, other
  7. RETURN other.ID, count(distinct ingredient.name)
  8. ORDER BY other.ID DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement