Show me the customer information about a customer named Daan Peeters.
select * from customers where first_name = "Daan" and last_name = "Peeters";
How many invoices has he had?
select count(*) from customers as t1 join invoices as t2 on t1.id = t2.customer_id where t1.first_name = "Daan" and t1.last_name = "Peeters";
In each invoice, how many tracks did he buy?
select t2.id, count(*) from invoice_lines as t1 join invoices as t2 on t2.id = t1.invoice_id join customers as t3 on t3.id = t2.customer_id where t3.first_name = "Daan" and t3.last_name = "Peeters" group by t2.id;
Can you show just all the names of these tracks!
select t1.name from tracks as t1 join invoice_lines as t2 on t1.id = t2.track_id join invoices as t3 on t3.id = t2.invoice_id join customers as t4 on t4.id = t3.customer_id where t4.first_name = "Daan" and t4.last_name = "Peeters";