window_funcs
window_funcs copied to clipboard
Minor issue with Correct Running Total Exercise
First off - thank you very much for putting this together as I've found it very useful and informative on my SQL data analyst journey.
From: http://www.windowfunctions.com/questions/over/3 The question states to Order by: weight desc
If taken as the column weight; the results won't appear in the correct order in the output. Oscar and Smokey will swap positions as will the running_total_weight values 12.2 and 6.1 (in that order).
It becomes obvious after seeing the answer that the challenger should order by running_total_weight after the FROM.