我需要此查询来匹配不同的课程和学生。这会给我带来巨额回报,但是当我返回c.name,s.name,count(*)时,结果是正确的。
match (t:TeacherEntity{name: 'Teacher2'}) -[:teaches] ->(c:CourseEntity)
<- [sc:student_attends_course] - (s:StudentEntity)
with c,s
match (c) - [:course_assignments] -> (a:AssignmentEntity)
optional match (a) <- [subm:student_submission] - (s)
where subm is null or subm.mark < 4
return c, s,count(*)
有什么想法吗?