title: SQL Cumulative Count with BigQuery for active
body: <p>I would like to know how to the rows date falls into once truncated into week. Current data is</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Ad Name</th>
  <th>Launch Date</th>
  <th>Last Seen</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Ad 1</td>
  <td>9 Dec, 2021</td>
  <td>16 Dec, 2021</td>
  </tr>
  <tr>
  <td>Ad 2</td>
  <td>1 Dec, 2021</td>
  <td>9 Dec, 2021</td>
  </tr>
  <tr>
  <td>Ad 3</td>
  <td>1 Dec, 2021</td>
  <td>31 Dec, 2021</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Desired output would be, imaginging that December has 4 weeks. The dates provided are examples only, they would be automatically generated by the SQL function date_trunc</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Week</th>
  <th>Active Ads</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Dec Date 1-7</td>
  <td>2</td>
  </tr>
  <tr>
  <td>Dec Date 7-14</td>
  <td>3</td>
  </tr>
  <tr>
  <td>Dec Date 14-21</td>
  <td>2</td>
  </tr>
  <tr>
  <td>Dec Date 21-30</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>