The College Board needs a monthly view of SAT performance across test centers. Write a PostgreSQL query that combines registration, student, test center, and score data to identify centers with at least two scored, confirmed registrations per month.
Requirements
- Use
INNER JOIN operations to combine the related tables.
- Consider only confirmed registrations from 2025 and use the latest score report for each registration.
- Group results by test center and registration month, returning registered count, scored count, and average total score.
- Use
HAVING to retain groups with at least two scored registrations.
- Use
LAG to show the previous month's average score and the change from that month.
- Briefly explain when a join is preferable to a subquery, and mention how a subquery or CTE could isolate the latest score report.