Solution: Build a Mini Dashboard
Explore how to build a mini dashboard by querying multiple tables. Learn to join student and grade data, filter scores above 90, group results by student, and order them to find top performers. This lesson helps you understand using joins, filters, aggregation, and sorting to extract meaningful insights from data.
We'll cover the following...
We'll cover the following...
Query
SELECT s.name, COUNT(*) AS high_score_countFROM students sJOIN grades g ON s.id = g.student_idWHERE g.score > 90GROUP BY s.nameHAVING COUNT(*) > 0ORDER BY high_score_count DESC;
Explanation
This query counts how many high scores (above 90) each student has and lists them in order of who has the most.
Let’s break it ...