Compare to Row

Question:

Cats are fickle. Each cat would like to lose weight to be the equivalent weight of the cat weighing just less than it.

Print a list of cats, their weights and the weight difference between them and the nearest lighter cat ordered by weight.


Return: name, weight, weight_to_lose
Order by: weight

Show Table
Show Desired Output

Query Window:

Click me!

Show Hint
Show Answer

Your output: