O Markus Schaber έγραψε στις Mar 29, 2006 :
> Hi, Achilleus,
>
> Achilleus Mantzios wrote:
>
> > foodb=# SELECT qoo.foo2,sum(qoo.foo3) from (SELECT mt.link_id as
> > foo,_int_union(array(select mt2.feat_id from markustest mt2 where
> > mt2.link_id=mt.link_id order by mt2.feat_id),'{}') as foo2
Hi, Achilleus,
Achilleus Mantzios wrote:
> foodb=# SELECT qoo.foo2,sum(qoo.foo3) from (SELECT mt.link_id as
> foo,_int_union(array(select mt2.feat_id from markustest mt2 where
> mt2.link_id=mt.link_id order by mt2.feat_id),'{}') as foo2,other::int4 as
> foo3 from markustest mt) as qoo GROUP BY
On 29 mar 2006, at 17.42, Achilleus Mantzios wrote:
The _int_union trick is to force the arrays to have unique values.
The order by has the meaning that '{5,23}' and '{23,5}' should be
treated
the same way.
I didn't have the _int_union function. Is it internal? What PG-
version did you use
O Markus Schaber έγραψε στις Mar 29, 2006 :
> Hello,
>
> I have a table filled from third party that basically has the following
> structure:
>
> link_id | feat_id | other | columns...
> +-+---+---
> 1 | 2 | ...
> 2 | 5 | ...
> 2 | 23
Hello,
I have a table filled from third party that basically has the following
structure:
link_id | feat_id | other | columns...
+-+---+---
1 | 2 | ...
2 | 5 | ...
2 | 23 | ...
3 | 5 | ...
3 | 23 | some | data