

-- MATCH (person:/univ_demo/person WHERE status = '在职' AND person_sort = '事业编' AND staff_type = '专任教师岗位')
--     -[:person_to_tech_duty*1..1]->(tech_duty:/univ_demo/tech_duty WHERE last_flag = '是' and duty_level='副高级') 
--     RETURN person.account AS "teacher_account", tech_duty.duty_level AS "tech_duty_level"
-- /**
-- output()
-- **/
-- ;
    
    
SELECT temp01.tech_duty_level AS "专业技术职务级别", 
count(distinct temp01.teacher_account) AS "专任教师人数" FROM (
    MATCH (person:/univ_demo/person WHERE status = '在职' AND person_sort = '事业编' AND staff_type = '专任教师岗位')
    -[:person_to_tech_duty*1..1]->(tech_duty:/univ_demo/tech_duty WHERE last_flag = '是') 
    RETURN person.account AS "teacher_account", tech_duty.duty_level AS "tech_duty_level"
) temp01 
GROUP BY temp01."tech_duty_level" 
order by "专任教师人数"
LIMIT 0, 500000 WITH TIMEOUT = 6m
/**
output()
match("专业技术职务级别", "初级", "专任教师人数", 3)
match("专业技术职务级别", "无", "专任教师人数", 7)
match("专业技术职务级别", "未定级", "专任教师人数", 19)
match("专业技术职务级别", "中级", "专任教师人数", 274)
match("专业技术职务级别", "正高级", "专任教师人数", 316)
match("专业技术职务级别", "副高级", "专任教师人数", 356)
**/
;
