X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6517E474E61 for ; Mon, 3 Mar 2003 13:49:48 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 78349-07 for ; Mon, 3 Mar 2003 13:49:37 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 50EB5475925 for ; Mon, 3 Mar 2003 13:49:37 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 3817243B056; Mon, 3 Mar 2003 13:49:37 -0500 (EST) Message-ID: <3E639DCF.9000705@_removespam_dexus.nl> Date: Mon, 03 Mar 2003 19:24:15 +0100 From: Erwin Moller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 X-Accept-Language: en-us, en MIME-Version: 1.0 X-Newsgroups: comp.databases.postgresql.sql Subject: Re: HardCORE QUERY HELP!!! References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 24 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/126 X-Sequence-Number: 12166 This is your prof speaking: "DO YOUR OWN HOMEWORK YOU CHEATER!" Seriously, I'll give you a hint: Try using SELECT * FROM emp WHERE ( sal > (SELECT sal FROM emp AS EMP2 WHERE (EMP2.mgr=emp.mgr)) ) or something like that. Use a ALIAS for the same table to distinguish them. Hmm I am doing your homework. Did I deserve a beer now? ;-) Regards, Erwin