#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2016
    Posts
    39
    Rep Power
    1

    Counting with condition


    Hi

    Looking to try and count the number of times two different employees have taken a morning and an evening off on the same day


    So if employee John has taken the morning off. And that day Suzy takes the evening off I want to count as 1

    I can do it with one or the other. But not both conditions at once on the same date.
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,639
    Rep Power
    4287
    Originally Posted by SGC3
    I can do it with one or the other.
    please show both
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2016
    Location
    Cheshire, UK
    Posts
    40
    Rep Power
    25
    It would really help us to help you if gave us some clues about your data (structure and content).

IMN logo majestic logo threadwatch logo seochat tools logo