Search⌘ K
AI Features

Practice Exercises on Advanced SQL

Explore and practice advanced SQL techniques through hands-on exercises. Learn to write queries for complex data analysis, such as calculating totals, averages, rankings, moving averages, and conditional priorities, to deepen your understanding and improve your data querying skills.

Now it’s time to apply what we’ve learned.

Practice problem 1

Write a query to calculate the total stock of all products in the ‘Books’ category.

MySQL 8.0
-- Write your query here

Practice Problem 2

List categories where the average product price is greater than $50.

MySQL 8.0
-- Write your query here

Practice problem 3

...