Re: Multiple Aggregations Order
"David G. Johnston" <[email protected]> Tue, 14 Jan 2020 13:43:51 -0700
| Newsgroups | gmane.comp.db.postgresql.general |
|---|---|
| Message-ID | <CAKFQuwZKcDHtvppy5O34qbwxsPs28SRtY3fEvU5HAwR=T41p+g@mail.gmail.com> |
--000000000000586b85059c1fa6a1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, January 14, 2020, Jo=C3=A3o Haas <[email protected]> wrote= : > > SELECT tb.*, array_agg(conn.child_id), array_agg(conn.kind) > > Create a custom type (using row(...) might work...?) with the relevant fields and =E2=80=9C...array_agg((child_id, kind)::custom_type order by ...= =E2=80=9D? David J. --000000000000586b85059c1fa6a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, January 14, 2020, Jo=C3=A3o Haas <<a href=3D"mailto:joao.ca.= [email protected]">[email protected]</a>> wrote:<blockquote class=3D"g= mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l= eft:1ex"><div dir=3D"ltr"><font face=3D"monospace">SELECT tb.*, array_agg(c= onn.child_id), array_agg(conn.kind)<br><br></font></div><div dir=3D"ltr"></= div></blockquote><div><br></div><div>Create a custom type (using row(...) m= ight work...?) with the relevant fields and =E2=80=9C...array_agg((child_id= , kind)::custom_type order by ...=E2=80=9D?</div><div><br></div><div>David = J.</div> --000000000000586b85059c1fa6a1--