Received: from leela.one-2-one.net (leela.one-2-one.net [217.115.142.65]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fALBw5m33184 for ; Wed, 21 Nov 2001 06:58:05 -0500 (EST) (envelope-from twanger@bluetwanger.de) Received: from [192.168.0.14] (pD90557EE.dip.t-dialin.net [217.5.87.238]) by leela.one-2-one.net (8.11.0/8.11.0) with ESMTP id fALBwi826150; Wed, 21 Nov 2001 12:58:45 +0100 Subject: Re: Joins~ From: Markus Bertheau To: Gurudutt Cc: pgsql-sql@postgresql.org In-Reply-To: <13216589307.20011121140728@indvalley.com> References: <13216589307.20011121140728@indvalley.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.99.2 (Preview Release) Date: 21 Nov 2001 12:57:59 +0100 Message-Id: <1006343880.29221.13.camel@entwicklung01.cenes.de> Mime-Version: 1.0 X-Archive-Number: 200111/301 X-Sequence-Number: 5683 On Wed, 2001-11-21 at 09:37, Gurudutt wrote: > I want to sort the combination of the result set, like > suppose an entry exists in tickettab as 2001-11-12 12:30 > and the next entry in tickettab is 2001-11-12 16:40 > > if there exists a entry in ticketmultab as 2001-11-12 13.30 > then I should get the results as follows > > > ticketid arrival date arrival time > > 1 2001-11-12 12:30:00 -- tickettab entry > 2 2001-11-12 13:30:00 --ticketmultab entry > 3 2001-11-12 16:40:00 -- tickettab entry maybe it works like this: select * from (