063countdistinct.mql 1.4 KB

123456789101112131415161718192021222324252627282930
  1. -- MATCH (person:/univ_demo/person WHERE status = '在职' AND person_sort = '事业编' AND staff_type = '专任教师岗位')
  2. -- -[:person_to_tech_duty*1..1]->(tech_duty:/univ_demo/tech_duty WHERE last_flag = '是' and duty_level='副高级')
  3. -- RETURN person.account AS "teacher_account", tech_duty.duty_level AS "tech_duty_level"
  4. -- /**
  5. -- output()
  6. -- **/
  7. -- ;
  8. SELECT temp01.tech_duty_level AS "专业技术职务级别",
  9. count(distinct temp01.teacher_account) AS "专任教师人数" FROM (
  10. MATCH (person:/univ_demo/person WHERE status = '在职' AND person_sort = '事业编' AND staff_type = '专任教师岗位')
  11. -[:person_to_tech_duty*1..1]->(tech_duty:/univ_demo/tech_duty WHERE last_flag = '是')
  12. RETURN person.account AS "teacher_account", tech_duty.duty_level AS "tech_duty_level"
  13. ) temp01
  14. GROUP BY temp01."tech_duty_level"
  15. order by "专任教师人数"
  16. LIMIT 0, 500000 WITH TIMEOUT = 6m
  17. /**
  18. output()
  19. match("专业技术职务级别", "初级", "专任教师人数", 3)
  20. match("专业技术职务级别", "无", "专任教师人数", 7)
  21. match("专业技术职务级别", "未定级", "专任教师人数", 19)
  22. match("专业技术职务级别", "中级", "专任教师人数", 274)
  23. match("专业技术职务级别", "正高级", "专任教师人数", 316)
  24. match("专业技术职务级别", "副高级", "专任教师人数", 356)
  25. **/
  26. ;