Re: Combine query views into one SQL string

From: Nils Zonneveld <nils(at)mbit(dot)nl>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Combine query views into one SQL string
Date: 2001-09-07 09:00:01
Message-ID: 3B988C82.9C4782E4@mbit.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Maik wrote:
>
> Its clear, union concat the two results.
>
> But he can also use this join version, if its the intention.
>
> select t1.id, sum(t1.amount), t2.id, sum(t2.amount) from table1 as t1,
> table2 as t2 where t1.id=t2.id;
>

Yeps, thats another way to write an inner join :-)

Mazzel,

Nils

--
Alles van waarde is weerloos
Lucebert

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-09-07 14:19:38 Re: ERROR: DefineQueryRewrite: rule plan string too big.
Previous Message Maik 2001-09-07 08:42:01 Re: Combine query views into one SQL string