Customer Coverage
Part of the Connected Data section of Coddy's PostgreSQL journey. Lesson 5 of 25.
Challenge
MediumReturn customer_id, name and paid_count for every customer. Count paid orders only, keeping customers with zero. Order by customer id.
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 Connected Data
1Connect Tables
Match Rows with JOINKeep Rows with LEFT JOINCount After a JoinFind Missing MatchesCustomer CoveragePractice on your own: PostgreSQL playground