t are the coordinates for each node and the result
must be ordered by this to obtain the correct result.
-- Original Message --
From: "Geoff Winkless"
To: "Sterpu Victor"
Cc: "PostgreSQL General"
Sent: 11/29/2015 10:51:32 PM
Subject: Re: Re[2]: [GENE
On 29 November 2015 at 20:51,
I
wrote:
> Well you could look at the intarray extension and a combination of
> array_agg, uniq() and
> *string_to_array*:
Mind blip, apologies, obviously I meant array_to_string :)
Geoff
On 29 November 2015 at 18:59, Sterpu Victor wrote:
> I can't skip the ordering.
> I'm sure aqjs3 is the one that produces the duplication.
> I guess subqueries are the only option, like this:
Well you could look at the intarray extension and a combination of
array_agg, uniq() and string_to_ar
1399031"
1399031;"1399032,1399033"
Is there a better way? I usualy try to avoid subqueries.
-- Original Message --
From: "Geoff Winkless"
To: "Sterpu Victor"
Cc: "PostgreSQL General"
Sent: 11/29/2015 6:42:18 PM
Subject: Re: [GENERAL] DISTINCT
On 28 November 2015 at 18:35, Sterpu Victor wrote:
> Can I make a distinct STRING_AGG?
> This is my query :
> SELECT atjs.id, STRING_AGG(CAST(aqjs1.id AS VARCHAR), ',' ORDER BY
> aqjs1.to_left) AS children
> FROM administration.ad_query_join_select atjs
> JOIN administration.ad_query aq ON (aq.id
On Nov 28, 2015, at 1:35 PM, Sterpu Victor wrote:
> Hello
>
> Can I make a distinct STRING_AGG?
> This is my query :
> SELECT atjs.id, STRING_AGG(CAST(aqjs1.id AS VARCHAR), ',' ORDER BY
> aqjs1.to_left) AS children
> FROM administration.ad_query_join_select atjs
> JOIN administration.ad_query
Hello
Can I make a distinct STRING_AGG?
This is my query :
SELECT atjs.id, STRING_AGG(CAST(aqjs1.id AS VARCHAR), ',' ORDER BY
aqjs1.to_left) AS children
FROM administration.ad_query_join_select atjs
JOIN administration.ad_query aq ON (aq.id=atjs.id_ad_query)
LEFT JOIN administration.ad_query_jo