Tesla·Software Engineer·Technical Phone Screen
- You're given a table with date, store_id, and amount columns. Write a SQL query to calculate cumulative sales per store, but the running total resets at the beginning of each month. Return store_id, date, and the cumulative amount.
“The reset-per-month part is what gets you.”