Median and average duration by device
Median and average duration by device
From the sessions table, for each device compute the median of duration_sec (median_duration) and the average duration rounded to 2 decimals (avg_duration). Return device, median_duration, avg_duration ordered by device ascending.
Expected output sample
| device | median_duration | avg_duration |
|---|---|---|
| desktop | 200 | 136.25 |
| mobile | 90 | 62.5 |
| tablet | 300 | 157.5 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid