How long is the history?

The store cut its first invoice on 2022-01-15 and its latest on 2024-03-05. How many days apart are the first and last invoices? Grab them with MIN(invoice_date) and MAX(invoice_date) and subtract via julianday() — one column, days_between.

Tables in this exercise
invoices
id customer_id invoice_date billing_city billing_country total

Back to the chapter