Search⌘ K
AI Features

Solution: Build a Mini Dashboard

Explore how to build a mini dashboard by querying multiple tables like real-world datasets. Learn to use JOINs, filter scores above 90, group data by student names, count high scores, and order results to highlight top performers.

We'll cover the following...

Query

SELECT s.name, COUNT(*) AS high_score_count
FROM students s
JOIN grades g ON s.id = g.student_id
WHERE g.score > 90
GROUP BY s.name
ORDER 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. ...