The cats want to show their weight by breed. The cats agree that they should show the second lightest cat's weight (so as not to make other cats feel bad)
Print a list of breeds, and the second lightest weight of that breed
Return: breed, imagined_weight
Order by: breed Show Table Schema
Correct output but can you use 'nth_value'?
nth_value() allows us to select the an arbitrary position in a subgroup next question
select distinct(breed), nth_value(weight, 2) over ( partition by breed order by weight RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) as imagined_weight from cats order by breed;