This repository has been archived on 2026-10-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
chinook/total_sales_{year}.sql
T

8 lines
235 B
SQL

SELECT strftime('%Y', InvoiceDate) as Year,
SUM(TOTAL) as YearlyTotal
FROM Invoice
WHERE strftime('%Y', InvoiceDate) = '2009'
OR strftime('%Y', InvoiceDate) = '2011'
GROUP BY strftime('%Y', InvoiceDate);
SELECT * FROM Invoice;