Subject | Ordering in the LIST function |
---|---|
Author | martins.goncalo |
Post date | 2008-05-30T10:38:04Z |
Hello all!
I like the new aggregate function LIST() but I'm having some trouble
to do what I want to do with it.
Imagine this situation:
select
country.name,
list(city.name)
from country,city
where city.id_country=country.id_country
group by country.name
This is just an example but imagine I want the citys to be orderer in
the list function by the population of each city (field existing in
the city table).
Is there any way to achieve this type of ordering in the list funcion?
Or how do I control the order in the list function? Or any other
sugestion on how to achieve this kind of lists?
Thanks in advance
Best Regards
Gonçalo Martins
I like the new aggregate function LIST() but I'm having some trouble
to do what I want to do with it.
Imagine this situation:
select
country.name,
list(city.name)
from country,city
where city.id_country=country.id_country
group by country.name
This is just an example but imagine I want the citys to be orderer in
the list function by the population of each city (field existing in
the city table).
Is there any way to achieve this type of ordering in the list funcion?
Or how do I control the order in the list function? Or any other
sugestion on how to achieve this kind of lists?
Thanks in advance
Best Regards
Gonçalo Martins