Subject Re: [firebird-support] Re: Ordering in the LIST function
Author Dmitry Yemanov
martins.goncalo wrote:
>
> 2: This doesn't work (doesn't order the citys by population)
>
> select
> country.name_country,
> list(citys.name_city)
> from country,SP_CITYS citys
> where citys.id_country = country.id_country
> group by country.name_country

Try this:

select country.name_country, list(citys.name_city)
from country
left join SP_CITYS citys on citys.id_country = country.id_country
where citys.id_country is not null
group by country.name_country


Dmitry