Results 1 to 3 of 3

Thread: calculating the sum of a field in a query with join

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Aug 2007
    Answers
    18

    calculating the sum of a field in a query with join

    Select attend.overtimehours from attendance attend, salarydetail sal where attend.employeeid = sal.employeeid

    in the above query,how can i fetch the sum of overtimehours?
    attendance table
    column_name data_type
    -------------------- -------------------
    attendancerid number
    employeeid number
    shiftid number
    dayofattendance date
    timein date
    timeout date
    numberofhours number
    overtimehours number
    presentflag varchar2

    salarydetail table
    column_name data_type
    ----------------- --------------------
    salaryid number
    employeeid number
    startdate date
    enddate date
    grosssalary number
    netsalary number
    overtimeamount number
    lopamount number
    paiddays number

    Last edited by jamesravid; 09-05-2007 at 12:14 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact