----- Original Message ----- From: "Paolo Vernazza" > I would try something like that.... > > SELECT > date_ext.mydate as MyDate, > city_ext.city as MyCity, > number_ext.mynum as MyNumber > FROM > number_ext JOIN city_ext ON number_ext.city = city_ext.id JOIN > date_ext ON number_ext.mydate = date_ext.id > WHERE > date_ext.mydate = ( SELECT MAX( date_ext.mydate ) FROM date_ext ) > ORDER BY > city_ext.city, > number_ext.position
what a great solution, i throught with JOIN in 3 tables but it didn't work correctly, I've just added JOIN for city_ext and number_ext and now time is: 0.081977 cool !!! SELECT number_ext.mynum as MyNum, city_ext.city as MyCity FROM number_ext JOIN city_ext ON number_ext.city = city_ext.id WHERE number_ext.mydate = ( SELECT date_ext.id FROM date_ext WHERE date_ext.mydate = ( SELECT MAX( date_ext.mydate ) FROM date_ext ) ) ORDER BY city_ext.city, number_ext.position > I think that the tables schema and the dump of some data could be usefull... I've posted schema 3 mails ago, however thank you again ! > Paolo ciao, andr3a :)