title: date clause function
body: <p>I would like to get data from table but only from last 1 month and without current week I tried to do that by where clause but i don't know how to exclude current week ( function datepart and getdate doesn't work ) :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">id</th>
  <th style="text-align: center;">date</th>
  <th style="text-align: right;">money</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">2021-11-25 00:00:00</td>
  <td style="text-align: right;">2</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">2021-10-28 00:00:00</td>
  <td style="text-align: right;">3</td>
  </tr>
  <tr>
  <td style="text-align: left;">3</td>
  <td style="text-align: center;">2021-06-25 00:00:00</td>
  <td style="text-align: right;">4</td>
  </tr>
  </tbody>
  </table>
  </div>
  <pre><code>select * 
  from table
  where DATE(date) &gt; DATE_SUB(DATE_TRUNC(CURRENT_DATE(), month), INTERVAL 1 month ) ```
  
  </code></pre>