Compare to Row Part 2

Question:

The cats now want to lose weight according to their breed. Each cat would like to lose weight to be the equivalent weight of the cat in the same breed weighing just less than it.

Print a list of cats, their breeds, weights and the weight difference between them and the nearest lighter cat of the same breed.


Return: name, breed, weight, weight_to_lose
Order by: weight

Show Table
Show Desired Output

Query Window:

Click me!

Show Hint
Show Answer

Your output: