Monthly Close
Part of the SQL Foundations section of Coddy's PostgreSQL journey. Lesson 22 of 22.
Challenge
MediumFor paid orders only, return month_start, order_count and revenue by calendar month. month_start is a date; revenue is the sum of amount. Keep months with revenue at least 40 and order by month_start.
The input tables are shown in the test panel. Each run starts from fresh data. Return the named columns in the stated order; do not hard-code the displayed rows.
Try it yourself
-- Write your SQL here.
All lessons in SQL Foundations
Practice on your own: PostgreSQL playground