Partitioned Running Totals
The cats must by ordered first by breed and second by name. They are about to enter an elevator one by one. When all the cats of the same breed have entered they leave.
We would like to know what the running total weight of the cats is.
Return: name, breed, running total weight
Order by: breed, name Show Table Schema
Correct output but can you use 'partition by'?
Over coupled with partition by allows us to further break down our aggregate functions,
it is often used for running totals of types or classes of items. next question
select name, breed, sum(weight) over (partition by breed order by name) as running_total_weight from cats