pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nils Zonneveld <nils@mbit.nl>
To: pgsql-sql@postgresql.org
Subject: Re: Combine query views into one SQL string
Date: Fri, 07 Sep 2001 11:00:01 +0200
Message-ID: <3B988C82.9C4782E4@mbit.nl> (raw)
References: <63e57aa8.0109060835.33719290@posting.google.com>
	<3B97DC1F.94433F65@mbit.nl>
	<9na15r$ku4$1@narses.hrz.tu-chemnitz.de>



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



view thread (7+ messages)  latest in thread

Message-ID: <3B988C82.9C4782E4@mbit.nl>
Permalink:  ../3B988C82.9C4782E4@mbit.nl/
Also on:    postgresql.org/message-id/3B988C82.9C4782E4@mbit.nl

 · 

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: pgsql-sql@postgresql.org
  Cc: nils@mbit.nl
  Subject: Re: Combine query views into one SQL string
  In-Reply-To: <3B988C82.9C4782E4@mbit.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox