Show the number of orders for each customer name!
select count(*), t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t1.id = t2.customer_id group by t1.id;
Also include the total amount each has spent!
select sum(t2.total), count(*), t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t1.id = t2.customer_id group by t1.id;
Show the entry for customer named Lucas Mancini.
select sum(t2.total), count(*), t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t1.id = t2.customer_id where t1.first_name = "Lucas" and t1.last_name = "Mancini";
Actually, just show the total amount of money!
select sum(t2.total) from customers as t1 join invoices as t2 on t1.id = t2.customer_id where t1.first_name = "Lucas" and t1.last_name = "Mancini";