← All Exercises

Join with Aggregation

basicsql~15min

Background

Join with aggregation is the most common pattern for business reporting queries.

Problem

Join orders with customers and aggregate total spending per customer.

Input

Orders and customers tables

Output

Customer spending summary

Sample tests

Sample 1

Input: orders join customers
Expected: total per customer

Your solution

Learning objective

Learn join patterns and aggregate functions