I'd do somethings like:

select * from (
    select id, sum(col1), sum(col2) from tablename group by yada
   ) as a [full, left, right, outer] join (
    select id, sum(col3), sum(col4) from tablename group by bada
    ) as b
on (a.id=b.id);

and choose the join type as appropriate.
Thanks!  Your idea worked like a champ!
Mark

<<attachment: mark_fenbers.vcf>>

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to