title: count the number of 1st and 0's with a specific date
body: <p>In my database i have column name department and employed(return type is bit - 0 or 1), i would like to count the number of employee employed in each department (there are 5 departments) for this year and rank the department who has the highest employee. I need help combining SQL query. </p>
  
  <p>This is how i can calculate 0'1 and 1's <code>SELECT COUNT(CASE Authorised WHEN 1 THEN 1 ELSE NULL END) FROM TableName;</code>
  and this is how i can select date for this year: `</p>
  
  <pre><code>SELECT distinct * 
  From TableName 
  WHERE Time BETWEEN CONVERT(Date,@Time) AND CONVERT(Date, @Time2)
  </code></pre>
  
  <p>How do i combine these query?</p>