200.return_table.mql 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. -- -- alter class /mingdao1/project with core=memory
  2. -- -- alter class /mingdao1/project with core=cassandraonly
  3. -- -- ;
  4. -- -- select project.attr9 as "省份", count(project.id) as "项目数量" from /mingdao1/project project where attr45 between '2000-01-01' and '2025-12-31' group by project.attr9
  5. -- -- select project.attr9 as "省份", count(project.id) as "项目数量" from /mingdao1/project project where attr45 between '2025-01-01' and '2025-12-31' group by project.attr9
  6. -- /**
  7. -- output()
  8. -- **/
  9. -- ;
  10. -- SELECT count(project.id) AS "total projets" FROM /mingdao1/project project WHERE attr151 between '2025-01-01T00:00:00' AND '2025-12-31T23:59:59'
  11. -- /**
  12. -- output()
  13. -- **/
  14. -- ;
  15. -- MATCH (staff:/mingdao1/staff WHERE attr1 = '钟宏')-[:is_solve_person_of_case]->(case:/mingdao1/case WHERE attr30 >= '2024-01-01' AND attr30 <= '2024-12-31')-[:is_case_of_project]->(project:/mingdao1/project)<-[:is_contract_of_project]-(contract:/mingdao1/contract), (project)<-[:is_admin_of_project]-(pm:/mingdao1/staff)
  16. -- RETURN contract.attr18 AS "contract_amount", pm.attr1 AS "pm_name", pm.attr0 AS "pm_id"
  17. -- /**
  18. -- output()
  19. -- **/
  20. -- ;
  21. -- match (examination:/birddata/examination) - [:examination_examination_id_patient_patient_id] -> (patient:/birddata/patient) return examination.id,patient.id,examination.examination_id,patient.patient_id
  22. MATCH (contract:/mingdao1/contract WHERE attr15 > 1e+06)-[:is_contract_of_project*1..1]->(project:/mingdao1/project WHERE attr45 between '2024-01-01' AND '2024-12-31' AND attr40 like '*已完成*')<-[:is_admin_of_project*1..1]-(pm:/mingdao1/staff WHERE attr26 = '北京')
  23. RETURN project.attr3 AS "项目名称", contract.attr15 AS "合同金额", pm.attr0 AS "项目经理工号", pm.attr1 AS "项目经理姓名"
  24. -- where 项目经理姓名 is not null
  25. -- order by "项目经理工号" asc , "项目名称" asc , "合同金额" asc
  26. /**
  27. output()
  28. **/
  29. ;