SQL · Intermediate · 35 min
Action counts without duplicate joins
Join event tables without multiplying the result.
Task
For impressions on 2026-01-15, count the actions attached to each page. Impressions and actions may contain identical repeated messages. Keep pages with no actions.
Requirements
- impressions has impression_id, page_name, and day. actions has action_id and impression_id.
- A repeated message with the same ID is an identical copy. Count each action ID once.
- Ignore actions whose impression does not exist or belongs to another day.
- Return page_name and action_count ordered by page_name. Use SQLite.
JoinsDeduplicationAggregation grain
Loading exercise…