Daily revenue rollup for the finance dashboard

Code reviewEasy12 min

Your task

This job builds the table behind the finance dashboard: revenue per day and country for the last 90 days. orders has one row per order line, about 6 million rows. The job takes about 25 minutes, and the analytics team now wants it every hour. What do you flag before this ships?