title: Time period in group by sql query
body: <p>I am developing a book reservation system for a library.
  In the table of the Reservations there are the fields:
  <strong>id_reservation, id_user, id_book, datetime.</strong> </p>
  
  <p>I want to count the reservations that completed in the mornings and the reservations completed in the evenings assuming that morning is between 10:00 and 15:00 and evening is between 15:00 and 21:00.</p>
  
  <p>I need something like :
  Select count(id_reservation) as total_reservations from reservations group by <strong>time_period</strong>  </p>
  
  <p>Any help <strong>how to distinquish the two time periods</strong> in order to use them in <strong>GROUP BY</strong>?</p>
  
  <p>Thanks a lot!!</p>