title: MySQL select by payment interval like monthly, quaterly, halfyear, yearly
body: <p>I am currently working on a query that tells me whether the interval is in this month based on the payment interval (monthly, quarterly, halfyear, yearly) and the start date.</p>
  <p>I have a table called &quot;contract&quot; and it contains the following fields:</p>
  <ul>
  <li>contract_start (DATE)</li>
  <li>contract_payment (VARCHAR)</li>
  </ul>
  <p>Example:</p>
  <pre><code>contract_start = 2020-01-16
  contract_payment = half_year
  </code></pre>
  <p>Is the start date taking into consideration the interval in this month? The command must be &quot;smart&quot; enough to also work with monthly, yearly and semi-annual.</p>