With a CTE, compute revenue per month (first day of month) from all order items, then return the months with revenue above 8,000 as month and revenue.
6 rows with columns month, revenue — first 3 shown:
| # | ||
|---|---|---|
| 1 | 2024-01-01 00:00:00 | 9941 |
| 2 | 2024-03-01 00:00:00 | 11689 |
| 3 | 2024-04-01 00:00:00 | 8795 |
Run your code to see the output here.