Hacker News new | ask | show | jobs
by krackers 2559 days ago
>how would you find the names of any two brands whose bicycles have the same colour?

At first glance I thought it'd just be a group by + having followed by some sort of SELECT to get the first 2 in each group. But apparently doing that top-k in each group is a nightmare in SQL [1].

[1] https://stackoverflow.com/questions/8748986/get-records-with...