I would like to have returned the top N entries
of a table for each distinct Colvalue s.
For example:
Table
id s
1 w
2 w
3 e
4 w
5 w
6 e
7 e
What I want returned is (N above = 2)
id s
1 w
2 w
3 e
6 e
Any ideas on a query that will do this?
thanks.
(I'm sure I have seen this before and the solution is
probably right under my nose!)
of a table for each distinct Colvalue s.
For example:
Table
id s
1 w
2 w
3 e
4 w
5 w
6 e
7 e
What I want returned is (N above = 2)
id s
1 w
2 w
3 e
6 e
Any ideas on a query that will do this?
thanks.
(I'm sure I have seen this before and the solution is
probably right under my nose!)