069.match.mql 1.0 KB

1234567891011121314151617181920212223242526272829
  1. MATCH (person:/univ_demo/person WHERE status = '在职' AND (polity = '中共党员' OR polity = '中共预备党员'))
  2. -[:person_to_org*1..1]->
  3. (org:/univ_demo/org)
  4. RETURN person.account AS "person_account", org.name AS "org_name" INTO /temp01_party_member_eb1a5b20-4177-4eed-89c8-77c800d6fc8b-0 WITH TIMEOUT = 5m
  5. /**
  6. output()
  7. **/
  8. ;
  9. {"sql":"SELECT temp01.org_name AS \"学院名称\", count(temp01.person_account) AS \"党员人数\" FROM /temp01_party_member_eb1a5b20-4177-4eed-89c8-77c800d6fc8b-0 temp01 GROUP BY temp01.\"org_name\" ORDER BY \"党员人数\" DESC LIMIT 0, 500000"}
  10. /**
  11. output()
  12. **/
  13. ;
  14. SELECT temp01.org_name AS "学院名称", count(temp01.person_account) AS "党员人数" FROM
  15. (MATCH (person:/univ_demo/person WHERE status = '在职' AND (polity = '中共党员' OR polity = '中共预备党员'))
  16. -[:person_to_org*1..1]->(org:/univ_demo/org)
  17. RETURN person.account AS "person_account", org.name AS "org_name") temp01
  18. GROUP BY temp01."org_name" ORDER BY "党员人数" DESC LIMIT 0, 500000 WITH TIMEOUT = 5m
  19. /**
  20. output()
  21. **/
  22. ;