Each cat would like to know what weight percentile it is in. This requires casting to an integer
Return: name, weight, percent
Order by: weight Show Table Schema
Correct output but can you use 'cume_dist'?
cume_dist() is similar to percent_rank(). The difference is the first entry in cume_dist is not 0. next question
select name, weight, cast(cume_dist() over (order by weight) * 100 as integer) as percent from cats order by weight