Subject | query for min and max value in group |
---|---|
Author | harri007et |
Post date | 2004-06-05T11:55:18Z |
Hi!
I have a table with 3 columns A, B, C like:
A, B, C
=======
1, 1, A
1, 2, A
1, 3, B
1, 4, A
2, 10, A
2, 11, B
2, 12, C
2, 13, A
...
Is it possible to write query, what returns:
1) values in column A where "value in column c, corresponding to
_group_minimum_ value in column B" equals A => should return 1,1,A;
2,10,A etc.
2) as above but comparing max values - should return 1,4,A; 2,13,A;
etc.
thanks,
Harri
I have a table with 3 columns A, B, C like:
A, B, C
=======
1, 1, A
1, 2, A
1, 3, B
1, 4, A
2, 10, A
2, 11, B
2, 12, C
2, 13, A
...
Is it possible to write query, what returns:
1) values in column A where "value in column c, corresponding to
_group_minimum_ value in column B" equals A => should return 1,1,A;
2,10,A etc.
2) as above but comparing max values - should return 1,4,A; 2,13,A;
etc.
thanks,
Harri