title: How to count two rows with the same DATE and TIME as 1 row
body: <pre><code>ID       |         Date      |    Status      |      Physician ID
  
  44397479   10/13/2009 17:40     NOSHOW
  44397480   10/13/2009 16:40     CHECKED OUT            108 
  44397481   10/13/2009 14:32     CHECKED OUT            108
  44397482   10/14/2009 10:44     RESCHEDULED            108
  44397483    8/26/2009 12:35     RESCHEDULED            108
  44397484   10/13/2009 15:26     CHECKED OUT            108
  56084463   10/10/2009 10:00     PENDING                108
  56287658   10/14/2009 10:44     PENDING                108
  54728032   10/13/2009 15:56     CHECKED OUT            108
  </code></pre>
  
  <p>This is a sample from a table that contains millions of records.</p>
  
  <p>I need to write a query that will count any two rows that meet the following criteria:</p>
  
  <ol>
  <li>The 2 rows have the same time (only time, not date)</li>
  <li>The status of one row is <code>RESCHEDULED</code> and the other row is <code>PENDING</code></li>
  </ol>
  
  <p>I want to display the two rows, as one row only(in the <code>SUM</code> function) for each Physician. </p>
  
  <p>How can I achieve this with SQL? </p>