203.return-distinct.mql 798 B

123456789101112131415161718192021222324252627282930313233343536
  1. MATCH
  2. (room:/hxyy/room)
  3. -[:room_personnel_info_to_person_job_number*1..1]->
  4. (person:/hxyy/person WHERE department is not null)
  5. RETURN DISTINCT room.id AS "room_id", person.department AS "person_department", _.path
  6. order by "person_department","room_id"
  7. /**
  8. timeout(5m)
  9. output()
  10. **/
  11. ;
  12. MATCH
  13. (room:/hxyy/room)
  14. -[:room_personnel_info_to_person_job_number*1..1]->
  15. (person:/hxyy/person WHERE department is not null)
  16. RETURN DISTINCT room.id AS "room_id", person.department AS "person_department"
  17. INTO /temp_room_person_e6820088-9996-48ab-a500-7b928a17783d WITH TIMEOUT = 6m
  18. /**
  19. timeout(5m)
  20. output()
  21. **/
  22. ;
  23. select room_id, person_department
  24. from /temp_room_person_e6820088-9996-48ab-a500-7b928a17783d
  25. order by room_id, person_department
  26. /**
  27. timeout(5m)
  28. output()
  29. **/
  30. ;