Syapse's Precision Medicine Platform needs a state-level education summary to identify regions with the fewest graduates while prioritizing regions with the largest student populations. Write a PostgreSQL query that uses the student, graduate, and education tables.
Requirements
- Count distinct students and distinct graduates for each student state.
- Include students with no graduate or education record, treating missing graduate records as zero graduates.
- Identify every state tied for the minimum graduate count, then return the three states with the most students among that group.
- Sort by total students descending, then state ascending to make ties deterministic.