FunctionRacerProblemsRace

Totals by Month

EasySQLSQLite

day is a date written as text, like 2026-03-14. Return one row per month that has orders: month as the first 7 characters of the date (2026-03) and total, the sum of amount in that month. Earliest month first.

Example 1

orders
iddayamount
12026-01-05100
22026-01-2050
32026-02-0170
42025-12-315
returns
monthtotal
2025-125
2026-01150
2026-0270

Constraints

Race itor take your time

Write it in your browser, against the clock. The model query, with a note on each piece of it, comes after.

More SQL problems