I have trouble getting the data in the right order from a table with the columns Date and City:
APRIL 8 2010 | AMSTERDAM
APRIL 9 2010 | ZAGREB
APRIL 10 2010 | AMSTERDAM
APRIL 11 2010 | NEW YORK
APRIL 15 2010 | NEW YORK
I want to have the record with the nearest Date in the future on the top. Then I want to display all the other records with the same City under it ordered by date. Next I want to have the next city with the nearest date ... and so on.
So the result should be:
APRIL 8 2010 | AMSTERDAM
APRIL 10 2010 | AMSTERDAM
APRIL 9 2010 | ZAGREB
APRIL 11 2010 | NEW YORK
APRIL 15 2010 | NEW YORK
Who can help me with a single select statement to get this?
I am lost
APRIL 8 2010 | AMSTERDAM
APRIL 9 2010 | ZAGREB
APRIL 10 2010 | AMSTERDAM
APRIL 11 2010 | NEW YORK
APRIL 15 2010 | NEW YORK
I want to have the record with the nearest Date in the future on the top. Then I want to display all the other records with the same City under it ordered by date. Next I want to have the next city with the nearest date ... and so on.
So the result should be:
APRIL 8 2010 | AMSTERDAM
APRIL 10 2010 | AMSTERDAM
APRIL 9 2010 | ZAGREB
APRIL 11 2010 | NEW YORK
APRIL 15 2010 | NEW YORK
Who can help me with a single select statement to get this?
I am lost