Hard
Aggregations
Pro Challenge

Conditional Distinct Customers Across Channels

For each month, count distinct customers with completed web activity, completed store activity, both channels, and exactly one channel. Repeated transactions must count a customer once; cancelled activity is excluded. Return columns: month, web_customers, store_customers, both_channels, exactly_one_channel.

Preparing the interactive SQL workspace...

Challenge overview

What you will practice

For each month, count distinct customers with completed web activity, completed store activity, both channels, and exactly one channel. Repeated transactions must count a customer once; cancelled activity is excluded. Return columns: month, web_customers, store_customers, both_channels, exactly_one_channel.

Difficulty
Advanced
SQL concept
Aggregations