Received: from syse.dce.vic.gov.au (syse.nre.vic.gov.au [203.11.140.1]) by hub.org (8.9.1/8.9.1) with ESMTP id HAA08570; Sat, 7 Nov 1998 07:04:49 -0500 (EST) (envelope-from mathera@woody.agvic.gov.au) Received: from sysm.dce.vic.gov.au (sysm.dce.vic.gov.au [157.128.80.81]) by syse.dce.vic.gov.au (8.9.1a/8.9.1) with ESMTP id XAA11592; Sat, 7 Nov 1998 23:04:30 +1100 (EST) Received: from ag-gpo.agvic.gov.au (ag-gpo [157.128.36.36]) by sysm.dce.vic.gov.au with ESMTP id XAA19727 (8.8.5/IDA-1.7); Sat, 7 Nov 1998 23:04:46 +1100 (EST) Received: from woody.agvic.gov.au (woody.agvic.gov.au [157.128.79.21]) by ag-gpo.agvic.gov.au with ESMTP id XAA17836 (8.8.5/IDA-1.7); Sat, 7 Nov 1998 23:07:42 +1100 (EST) Received: from WOODY/SpoolDir by woody.agvic.gov.au (Mercury 1.31); 7 Nov 98 23:04:24 +11:00 Received: from SpoolDir by WOODY (Mercury 1.31); 7 Nov 98 23:04:15 +11:00 Received: from salmon by woody.agvic.gov.au (Mercury 1.31); 7 Nov 98 23:04:03 +11:00 Comments: Authenticated sender is From: "Andrew Mather (Powered By Linux)" Organization: COMPLETE LACK OF To: pgsql-novice@postgreSQL.org, pgsql-sql@postgreSQL.org Date: Sat, 7 Nov 1998 22:55:16 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: SQL help Reply-to: mathera@woody.agvic.gov.au X-Confirm-Reading-To: mathera@woody.agvic.gov.au X-pmrqc: 1 Priority: normal X-mailer: Pegasus Mail for Win32 (v2.53/R1) Message-ID: <103D75BA54B5@woody.agvic.gov.au> G'day All, I'm having a bit of trouble with a couple of SQL statements and hope someone can help. Firstly can postgresql handle JOINs ? I can't seem to find anything about it. more importantly: I have a small db set up as follows: EMPLOYEES employee_id name address salary PROJECTS project_id project_name project_location WORKS_ON employee_id project_id job rating I need to find: All employees who work on every project. (easy enough to find all who work on any particular project, but not those who work on EVERY project) distinct employees whose salary is higher than their managers. Thanks in anticipation Andrew -------------------------------------------------------- Andrew Mather: System Administrator, VIAS mathera@woody.agvic.gov.au / amsm@deakin.edu.au http://www.deakin.edu.au/~amsm/index.html Ph: 03 92174342 (BH), Mob 0413 009 761 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- All I need is a Wave and a board to surf it on. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-