G
Guest
Hi
I've been trying to write a query that does the following (I'm failing miserably and haven't found any examples to do this although I suspect it's such a common task there should be heaps...and yes I have zero experience with sql
Say I have a number of columns and that one of these columns have a numerical value
col1 col2 col
1 4
1 3
2 1
2 2
3 8
What I'd like to do is select the rows that have the highest value for col3 respectively. In this example the question should return
{{1, 3, 6}, {2, 3, 4}, {3, 8, 9}
that is, rows 2, 4, and 5
If someone could be so kind as to explain how I could do this, I would really appreciate it
Cheer
/Magnus
I've been trying to write a query that does the following (I'm failing miserably and haven't found any examples to do this although I suspect it's such a common task there should be heaps...and yes I have zero experience with sql
Say I have a number of columns and that one of these columns have a numerical value
col1 col2 col
1 4
1 3
2 1
2 2
3 8
What I'd like to do is select the rows that have the highest value for col3 respectively. In this example the question should return
{{1, 3, 6}, {2, 3, 4}, {3, 8, 9}
that is, rows 2, 4, and 5
If someone could be so kind as to explain how I could do this, I would really appreciate it
Cheer
/Magnus