Lovely website, I'm finally learning about window functions as I do this. Thanks a bunch.
One question / bug report? Q7 rejects this:
select name, weight, weight - (min(weight) over (order by weight asc rows between 1 preceding and current row) ) as weight_to_lose from cats
is that much worse than lag() or is it just non-idiomatic?
(edit: and Q10 asks about "window", but it was quite hard to google. if you could provide another one of those links to the relevant docs, that could help a bunch :D)