Advertisement
Maks140888

Untitled

May 27th, 2022
708
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select u.name, count(g.grade + s.sent_date)
  2. from grades g, user_web u, solution s, task t
  3. where t.id = s.task_id
  4. and s.id = g.solution_id
  5. and s.student_id = u.id
  6. and g.grade_date = (select max(a.grade_date) from grades a, user_web b, task c
  7. where b.id = u.id and c.id = t.id)
  8. and g.grade < 60
  9. or s.sent_date is null
  10. group by u.name;
Advertisement
RAW Paste Data Copied
Advertisement