Your question is Common Users Between Two Tables. Start with the requirements and the two tables 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.
Paytm wants to identify users who used both Paytm Wallet and Paytm UPI during January 2026. Write a PostgreSQL query that returns the common user_id values from the two activity tables.
2026-01-01 through 2026-01-31, inclusive.user_id is NULL.user_id in ascending order.| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique Paytm Wallet activity event |
| user_id | INT | Paytm user identifier |
| activity_date | DATE | Date of Wallet activity |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique Paytm UPI activity event |
| user_id | INT | Paytm user identifier |
| activity_date | DATE | Date of UPI activity |