GROUP BY and HAVING Class 101
SELECT student_id, SUM(CAST(pass AS INT)) * 100 / COUNT(course_id) as pass_rate
FROM MyTable
GROUP BY student_id
HAVING(sum(cast(pass as int)) * 100 / count(course_id)) > 95
solved SQL query a percentage [closed]
GROUP BY and HAVING Class 101
SELECT student_id, SUM(CAST(pass AS INT)) * 100 / COUNT(course_id) as pass_rate
FROM MyTable
GROUP BY student_id
HAVING(sum(cast(pass as int)) * 100 / count(course_id)) > 95
solved SQL query a percentage [closed]