Show all the ids, customer ids, and invoice dates from invoices.
select id, customer_id, invoice_date from invoices
Could you show me them in order of most recently purchased?
select id, customer_id, invoice_date from invoices order by invoice_date desc;
Also include the customer names of each purchase!!
select t1.first_name, t1.last_name, t2.id, t2.customer_id, t2.invoice_date from customers as t1 join invoices as t2 on t2.customer_id = t1.id order by t2.invoice_date desc;
Show just the first name and last names of the 5 most recent purchases.
select t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t2.customer_id = t1.id order by t2.invoice_date desc limit 5;