Practice Interview Questions
| Question | Status |
|---|---|
You're assigned to analyze a Spotify-like dataset that records user listening habits. For each user, compute the total listening time and the count of unique songs they've listened to. Round the total listening duration to the nearest whole minute.
listening_habits table:
| Column Name | Description |
|---|---|
| user_id | Identifier of user |
| song_id | Identifier of song |
| listen_duration | Listening time (in seconds) |
Example output:
| user_id | total_listen_duration | unique_song_count |
|---|---|---|
| 101 | 8 | 2 |
| 102 | 5 | 2 |
| 101 | 8 | 2 |
| 102 | 5 | 2 |