[Solved] what should i do to make this SQL query work? [closed]
[ad_1] I’m quite sure this query will work; meaning that it won’t return an error but I’m not certain if it will return correct result as what you intended: SELECT s.Name, SUM(p.Note=5)/COUNT(*) as Anteil FROM Studenten s JOIN pruefen p ON p.MatrNr = s.MatrNr GROUP BY s.Name ORDER BY Anteil DESC, s.Name ASC; If this … Read more