Distinct pages per user
Distinct pages per user
From sessions(user_id, page), for each user_id build a sorted array of the distinct pages they visited. Output columns user_id and pages (an ascending-sorted array of distinct page values). Order the result by user_id ascending.
Expected output sample
| user_id | pages |
|---|---|
| 10 | [/catalog, /home] |
| 11 | [/home] |
| 12 | [/pricing] |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid