The best year

Now the money. For each year, compute total revenue — SUM(total) rounded to 2 decimals — extracting the year with strftime('%Y'). Show year and revenue, with the biggest earner first (ORDER BY).

Tables in this exercise
invoices
id customer_id invoice_date billing_city billing_country total

Back to the chapter