public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Andreas Joseph Krogh <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: ORDER BY elements in ARRAY
Date: Tue, 27 Aug 2024 05:39:34 -0700
Message-ID: <CAKFQuwZtFH9ZdrTvRMrE=Xq-HU0-xsmbfzmcyeSG7O5svtHW0Q@mail.gmail.com> (raw)
In-Reply-To: <VisenaEmail.11.efc8bf0cbc6c75fa.1919390a6d7@origo-test01.app.internal.visena.net>
References: <VisenaEmail.11.efc8bf0cbc6c75fa.1919390a6d7@origo-test01.app.internal.visena.net>
On Tuesday, August 27, 2024, Andreas Joseph Krogh <[email protected]>
wrote:
> Hi, I have this query:
>
>
>
> SELECT
> comp.entity_id as company_id, comp.companyname AS company_name
> , ARRAY(
> SELECT
> (pers.entity_id
> , pers.firstname
> , pers.lastname
> )::PersonTypeTest
> FROM onp_crm_person AS pers
> WHERE pers.relation_id = comp.entity_id
>
>
> Add order by here
>
>
> ) as person_array
>
> FROM onp_crm_relation comp
> ORDER BY person_array
> ;
>
>
David J.
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: ORDER BY elements in ARRAY
In-Reply-To: <CAKFQuwZtFH9ZdrTvRMrE=Xq-HU0-xsmbfzmcyeSG7O5svtHW0Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox