Exercise · SQL & Querying
Predict, then run it
Predict the output
laps(track, lap, riders) = (east,1,64),(east,2,58),(west,1,58),(west,2,60). Cumulative riders per track — resetting at each new track:
SELECT track, lap, SUM(riders) OVER (PARTITION BY track ORDER BY lap) AS cumulative FROM laps ORDER BY track, lap;
Predict the exact output.