40select.mql 611 B

12345678910111213141516171819202122232425262728293031323334353637
  1. select * from /univ_demo/org limit -1
  2. /**
  3. output()
  4. count(519)
  5. **/
  6. ;
  7. select * from /univ_demo/person limit -1
  8. /**
  9. output()
  10. count(3669)
  11. **/
  12. ;
  13. match (person:/univ_demo/person)-[:person_to_org]->(org:/univ_demo/org)
  14. return person.id as "person_id", org.id as "org_id"
  15. /**
  16. output()
  17. **/
  18. ;
  19. select count(aaa.org_id) as count, aaa.org_id from
  20. (match (person:/univ_demo/person)-[:person_to_org]->(org:/univ_demo/org)
  21. return person.id as "person_id", org.id as "org_id") aaa
  22. group by aaa.org_id having count(distinct aaa.person_id)>0
  23. /**
  24. output()
  25. count(1)
  26. match("aaa.org_id","univ_demo_org:2304",count,1)
  27. **/
  28. ;