Kto opuścił najwięcej zajęć?
Moje tabele to:
absence:
date
student_id
oraz:
student:
student_id
name
sex
Noi polecenie:
Kod
SELECT name, count(*) FROM absence, student
WHERE student.student_id=absence.student_id GROUP BY name
WHERE student.student_id=absence.student_id GROUP BY name
WYswietli nam pogrupowane nieobecnosci wedlug imienia studenta zliczone dla kazdego ucznia, a jak wybrać teraz z tego max ? Nalezy w tym celu stworzyc jakas dodatkwoa tabele ?