Postgres Subquery: CTEs, window functions and more | Hacker News Reader