Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2159A475F86 for ; Wed, 11 Dec 2002 04:06:44 -0500 (EST) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id C2F28475F84 for ; Wed, 11 Dec 2002 04:06:42 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Wed Dec 11 10:06:40 2002 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id KAA12639; Wed, 11 Dec 2002 10:06:39 +0100 (MET) Message-ID: <3DF7001F.C8D3FD3C@rodos.fzk.de> Date: Wed, 11 Dec 2002 10:06:39 +0100 From: Christoph Haller X-Mailer: Mozilla 4.06 [en] (X11; I; HP-UX B.10.20 9000/780) MIME-Version: 1.0 To: vijay25@telus.com Cc: pgsql-sql@postgresql.org Subject: Re: sql query Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/120 X-Sequence-Number: 10708 > > Hi I have a problem forming a query > I have 3 tables salary(hrs, clock_in , clock_out) > Break ( date, employe_id, net_time, break_in, break_out) > Employee(employee_id, pay_rate, name) > > I need to get an hourly report till the current time for that day > stating name, hour, no of hours, salary > Example > > Rob 3-4 48min $6.56 > Min 2-3 23min $2.34 > Min 3-4 54min $7.67 > > And so on..Would appreciate help on this.since I cant come up with the > query > How do you intend to find out which entry in your table "salary" is related to which employee as there is no id to refer to. Am I right in assuming your column "hour" with entries 3-4, 2-3, ... means from 3 til 4 o'clock and so on? Regards, Christoph