Back to problems

Write SQL window functions for D7 retention

SQL · Amazon · Medium

You are given two tables (all timestamps are UTC). game_sessions user_id (STRING) session_start_ts (TIMESTAMP) country (STRING) Each row represents a single play session. A user may appear many times, and different rows for the same user may carry different country values. ad_impressions user_id (STRING) impression_ts (TIMESTAMP) ad_type (STRING) — for example 'rewarded' or 'interstitial' revenue_usd (DECIMAL(10,4)) Each row represents one ad impression. A user may have no…

Checking your access…