title: How can I SELECT a query by incrementing days?
body: <p>I generate an Excel using an SQL query per each day:</p>
  
  <pre><code>SELECT      COUNT(res_id) as TotalReservation
  FROM        bup_vw_res_reservation
  WHERE       res_deleted = 0 
  AND         DATEPART(DAY,res_date_start) = 1
  </code></pre>
  
  <p>I execute this Query each time I want to change the DAY. To generate 1 sheet in my Excel file, I need to open and close 30 connections in my page. And if I need to make another sheet for a different company ,then I need to execute the same 30 query again. And the page becomes extremely slow :(</p>
  
  <p>Is there another way to get the same result in 1 query ?</p>