title: SQL Tickets sold - Last 30 Days - use Where or Having?
body: <p>How many tickets were sold for each route and each day, for the routes sold in the last 30 days from current day?</p>
  <pre><code>SELECT COUNT(TICKET_ID) NUMBER_TICKETS, ROUTE_CODE, FLIGHT_DATE 
  FROM TICKETS 
  WHERE (DAYS(CURRENT DATE)- DAYS(FLIGHT_DATE))&lt;=30
  GROUP BY ROUTE_CODE, FLIGHT_DATE
  </code></pre>
  <p>Should this be WHERE or HAVING? I am not sure which way is correct?</p>