What are the invoices of each customer?
select *, t2.total from customers as t1 join invoices as t2 on t2.customer_id = t1.id;
Show me the names of the customers with the top 15 totals!
select t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t2.customer_id = t1.id order by total desc limit 15;
How about the bottom 15!
select t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t2.customer_id = t1.id order by total limit 15;
How about the bottom 10!
select t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t2.customer_id = t1.id order by total limit 10;