how find total row of count(1)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mixupatel
    New Member
    • Dec 2012
    • 3

    #1

    how find total row of count(1)

    hey this my query

    Code:
    SELECT attnddate, COUNT(1)
        FROM inouttime where empcode='1' and to_date(attnddate,'DD-MM-YYYY') between to_date('01-01-2011','DD-MM-YYYY') and to_date('07-01-2011','DD-MM-YYYY')
       group by attnddate;
    and ouput is
    ATTNDDATE COUNT(1)
    02-01-2011 2
    03-01-2011 1
    01-01-2011 3
    now i want to find total attnddate of 1 employe and same date will count only 1 time
    Last edited by Rabbit; Dec 30 '12, 07:24 AM. Reason: Please use code tags when posting code.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Use a count distinct on the employee field.

    Comment

    Working...