Subject RE: [firebird-support] how to combine a field value while their id is same?
Author Svein Erling Tysvær
>As far as I know that the result of LIST(DISTINCT ...) is ordered is only
>an implementation detail, so it shouldn't be something you depend on.

Is there any simple way to order such a list, or any plans to implement it? Thinking a bit about the LIST answer, I tried

WITH TMP as
(select distinct f1, f2
From MyTable
Group by 1
Order by 2 desc)

Select f1, LIST(f2) from TMP group by 1

And to my surprise F2 was still ordered in ascending order in the output. Of course it can be done "manually" through EXECUTE BLOCK, it would just be nice if it was possible to do something like

Select f1, LIST(f2 descending) from TMP group by 1

Though I must admit I haven't needed such functionality yet and I don't know whether it would be worth the effort to implement something like this.

Set