Re: How to enforce a specific order of group_concat?

Dominique Devienne <[email protected]> Mon, 2 Mar 2020 17:19:38 +0100
Newsgroups gmane.comp.db.sqlite.general
Message-ID <CAFCRh-9pzHitvQt-GC4+DjvnPO1O-KtbjVhVMPR-ZnQ_KzC8Gw@mail.gmail.com>
On Mon, Mar 2, 2020 at 5:09 PM Keith Medcalf <[email protected]> wrote:
> select group_concat(value) from (select distinct value from test order by value);

But is that guaranteed to be ordered correctly "forever" instead of by
"happenstance"
from current implementation details? My point was that the Window
Function version
is ordered "by design", and not an implementation detail (as I think
the simpler version is).

Your subquery returns rows in a given order too, but "who" says
they'll be processed in that order?
Tables are just "sets of rows" after all, and the relational model is
about set-theory, no? order by
in subquery therefore make little to no sense in nested SQL (in theory...). --DD
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users