Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
-- execute_student_count_report.hql
use mydatabase;
INSERT INTO TABLE student_count_report
SELECT
school.school_name,
count(student.student_id) as cnt
FROM school
LEFT JOIN student on student.school_id = school.school_id
GROUP BY school.school_name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment