--- In [email protected], Mark Rotteveel <mark@...> wrote: > > On Sun, 23 Oct 2011 21:23:20 -0500, Gordon Niessen <gordon@...> > wrote: > >> The following query should work: > >> SELECT f1, LIST(f2) FROM table GROUP BY f1 > >> > >> Be aware that there is no defined order for the result of LIST. > >> > > If you use distinct, it will order the list. But you can't get 1 aa, > > aa, bb. So no duplicates. > > > > select f1, LIST(DISTINCT f2) from table group by f1 > > 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. >
i have tried the sql, it can work very nicely. thanks all very much.
