Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8792t793884 for ; Fri, 7 Sep 2001 05:02:55 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f87906s04384 for pgsql-sql@postgresql.org; Fri, 7 Sep 2001 05:00:06 -0400 (EDT) (envelope-from news) From: Nils Zonneveld X-Newsgroups: comp.database.ms-access, comp.database.oracle, comp.databases.postgresql.sql, comp.databases.sybase, comp.databases Subject: Re: Combine query views into one SQL string Date: Fri, 07 Sep 2001 11:00:01 +0200 Organization: Nilsies little old network Lines: 21 Message-ID: <3B988C82.9C4782E4@mbit.nl> References: <63e57aa8.0109060835.33719290@posting.google.com> <3B97DC1F.94433F65@mbit.nl> <9na15r$ku4$1@narses.hrz.tu-chemnitz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@cistron.nl X-Mailer: Mozilla 4.75 (Macintosh; U; PPC) X-Accept-Language: nl,en To: pgsql-sql@postgresql.org X-Archive-Number: 200109/80 X-Sequence-Number: 4727 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