Your question is Rolling 7-Day Swipes Average. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Tinder's Data Science team wants a daily engagement metric for each user. Write a PostgreSQL query that calculates the rolling 7-day average number of swipes per user from Tinder swipe activity.
user_id and swipe date.| Column | Type | Description |
|---|---|---|
| swipe_idPK | INT | Unique swipe event identifier |
| user_id | INT | Tinder user who performed the swipe |
| swiped_at | TIMESTAMP | Timestamp when the swipe occurred |
| swipe_type | VARCHAR(20) | Swipe classification |