Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Window functions don't work with aggregates
select max(p.mass) max_mass,
max(p.diameter) max_diameter,
max(p.density) max_density,
last_value( over (partition by null order by p.mass asc) lightest_planet,
from devstronomy.planet as p;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment