Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ncrlnk!ncratl!jgoodwin From: jgoodwin@ncratl.Atlanta.NCR.COM (John Goodwin) Newsgroups: comp.databases Subject: Re: SQL Question Summary: Better SQL Solution Message-ID: <671@ncratl.Atlanta.NCR.COM> Date: 11 Oct 90 20:26:48 GMT References: <391@ulticorp.UUCP> <1990Oct10.013533.949@ingres.Ingres.COM> Reply-To: jgoodwin@ncratl.Atlanta.NCR.COM (John Goodwin) Organization: NCR Engineering & Manufacturing Atlanta -- Atlanta, GA Lines: 8 Why not try the following: select unique PID from patients a where 100 >= (select max(b.WEIGHT) from patients b where b.pid = a.pid) This is one quick and dirty solution. Good Luck.