Every month-end, the owner of a small business asks the same two questions: how much did we sell, and how did each month do?
In a lot of offices the answer is a spreadsheet. Someone exports the orders, pastes them in, and adds them up by month. It takes most of an hour, and it goes wrong the month somebody misses a row.
If the orders already live in a database, that hour is four short queries. And next month you don't redo anything. You just run them again.
Here's the version from my free lesson, with a small made-up table you can paste into DB Fiddle (free, no account, pick MySQL).
The orders table
Lakeside Office Supply is a made-up shop with eight orders across one quarter.…