How many orders have each customer created by customer name?
select t1.first_name, t1.last_name, count(*) from customers as t1 join invoices as t2 on t2.customer_id = t1.id group by t1.id;
Show the entry with the lowest?
select t1.first_name, t1.last_name, count(*) from customers as t1 join invoices as t2 on t2.customer_id = t1.id group by t1.id order by count(*) asc limit 1;
How about the highest!
select t1.first_name, t1.last_name, count(*) from customers as t1 join invoices as t2 on t2.customer_id = t1.id group by t1.id order by count(*) desc limit 1;
How about the top 10!
select t1.first_name, t1.last_name, count(*) from customers as t1 join invoices as t2 on t2.customer_id = t1.id group by t1.id order by count(*) desc limit 10;