Hi,
I have the following table: My_table:
A B C D
LONDON b1 c1 d1
LONDON b2 c2 d2
LONDON b3 c3 d3
PARIS b4 c4 d4
PARIS b5 c5 d5
PARIS b6 c6 d6
PARIS b7 c7 d7
PRAGUE b8 c8 d8
PRAGUE b9 c9 d9
PRAGUE b10 c10 d11
I m using Microsoft Access.
I would like to get for each destination in column A(LONDON, PARIS, PRAGUE), his maximum in column B and the corresponding values in colomns C and D.
My problem is that with the following code :
select A, max(B) as B_max
from [My_table]
group by A;
I get this:
A B_max
LONDON b2
PARIS b5
PRAGUE b9
Rather I would like to get plus the above result the hole line associated to the max value found, like shown on the following :
A B C D
LONDON b2 c2 d2
PARIS b5 c5 d5
PRAGUE b9 c9 d9
Best Regards
I have the following table: My_table:
A B C D
LONDON b1 c1 d1
LONDON b2 c2 d2
LONDON b3 c3 d3
PARIS b4 c4 d4
PARIS b5 c5 d5
PARIS b6 c6 d6
PARIS b7 c7 d7
PRAGUE b8 c8 d8
PRAGUE b9 c9 d9
PRAGUE b10 c10 d11
I m using Microsoft Access.
I would like to get for each destination in column A(LONDON, PARIS, PRAGUE), his maximum in column B and the corresponding values in colomns C and D.
My problem is that with the following code :
select A, max(B) as B_max
from [My_table]
group by A;
I get this:
A B_max
LONDON b2
PARIS b5
PRAGUE b9
Rather I would like to get plus the above result the hole line associated to the max value found, like shown on the following :
A B C D
LONDON b2 c2 d2
PARIS b5 c5 d5
PRAGUE b9 c9 d9
Best Regards