Suppose I have a table that has three integer fields and one string field (just data).
For example it looks like:
Id Category Value Data
1 1 3 ...
2 1 4 ...
3 2 2 ...
4 2 4 ...
5 3 5 ...
6 3 6 ...
7 3 2 ...
8 4 1 ...
What I want to do is for each Category, include the row with the minimum Value field in the result set. In this case, it would return:
Id Category Value Data
1 1 3 ...
3 2 2 ...
7 3 2 ...
8 4 1 ...
How to write such a query?
Thanks!
1 Answer