Interactive SQL course
Learn SQL by writing real queries.
QueryCraft SQL teaches database thinking, SELECT queries, joins, aggregation, data changes, and performance through short lessons and hands-on exercises against one consistent course schema.
SELECT c.customer_name, SUM(oi.quantity * oi.unit_price) AS revenue
FROM customers c
JOIN orders o ON o.customer_id = c.customer_id
JOIN order_items oi ON oi.order_id = o.order_id
GROUP BY c.customer_name
ORDER BY revenue DESC;
Correct. 8 rows returned.
Course schema
One realistic database across the course
The full schema includes hubs, neighborhoods, customers, staff, suppliers, categories, products, inventory, promotions, orders, order items, payments, deliveries, reviews, and support tickets.