SQL and aggregated data: is there a better way? | Hacker News Reader