G
Guest
Dear developers – I have a problem that I can’t find the solutions for.
I have a table with products. It is simple to find the max value, but is it
possible to find the max, second max and third max values for all the
products in one country?
This is a sample table with the products: (There are also ProdID for all the
products.)
Product Value Country
Apple 20 Spain
Apple 19 Spain
Apple 20 Spain
Apple 18 Israel
Apple 21 Spain
Orange 8 Greece
Orange 4 Spain
Orange 5 Spain
Orange 7 Spain
Orange 9 Spain
The query would generate the following answered from Spain:
Product Max 2Max 3Max
Apple 21 20 19
Orange 9 7 5
Is this possible?
Than’s in advance
Stefan
I have a table with products. It is simple to find the max value, but is it
possible to find the max, second max and third max values for all the
products in one country?
This is a sample table with the products: (There are also ProdID for all the
products.)
Product Value Country
Apple 20 Spain
Apple 19 Spain
Apple 20 Spain
Apple 18 Israel
Apple 21 Spain
Orange 8 Greece
Orange 4 Spain
Orange 5 Spain
Orange 7 Spain
Orange 9 Spain
The query would generate the following answered from Spain:
Product Max 2Max 3Max
Apple 21 20 19
Orange 9 7 5
Is this possible?
Than’s in advance
Stefan