Received: from eba-haus.de (pec-23.au1.f.uunet.de [149.228.241.23]) by hub.org (8.9.3/8.9.3) with SMTP id EAA85377 for ; Mon, 20 Dec 1999 04:35:23 -0500 (EST) (envelope-from DieringG@eba-haus.de) Received: from kopo001 by eba-haus.de;Mon, 20 Dec 1999 09:30:13 GMT with Novell_GroupWise; Mon, 20 Dec 1999 10:30:13 +0100 Message-Id: X-Mailer: Novell GroupWise 5.5 Date: Mon, 20 Dec 1999 10:30:10 +0100 From: "Gerhard Dieringer" To: Cc: "<" Subject: Antw: Re: [SQL] group by / having Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id EAA85411 > X Y Z > 1 1 A > 1 2 B > 2 1 C > 3 1 D > 3 2 E > 3 3 F > > I want one line for each X value where the Y value is minimal, and I want > to get the T column also. select T1.X, T1.Y, T1.Z from T T1 where T1.Y=(select min(T2.Y) from T T2 where T1.X = T2.X); should give you the right answer (not tested) Gerhard