Scenario
Enrollment management wants to see, for each application status, how many applicants also have a record in the student table. Statuses where the two numbers diverge are where the funnel leaks: applicants counted at that stage who never became students in the system.
Expected output
6 rows — one per application status. applicant_count is the number of applications at that status; matriculated_count is how many of them match a row in ods_students (the column keeps the report's name, but it counts a student record, not a matriculation: denied and withdrawn applicants can have one too). Sorted by matriculated_count descending, then appl_current_status ascending.
appl_current_statuscurrent_status_descapplicant_countmatriculated_count
Tables
ods_applications ods_students