title: How to take past records and upcoming records using two columns
body: <p>I have two columns, using this two columns i have to take the records from my DB,</p>
  
  <ol>
  <li>Past EventId</li>
  <li>Upcoming eventId</li>
  </ol>
  
  <p>past eventId means which are the dates <code>(startDate &amp; dueDate)</code> already completed, i want to take the records</p>
  
  <p>upcoming eventId means which are the dates (startDate &amp; dueDate) Not yet completed, i want to take the records</p>
  
  <p><strong>events (table name)</strong></p>
  
  <pre><code>    eventId      name        startDate        dueDate
  
      1            A           2018-01-22       2018-01-22
      2            B           2018-01-26       2018-01-27
      3            C           2018-01-29       2018-01-31
  </code></pre>
  
  <p>I tried sql query like this</p>
  
  <pre><code>SELECT * FROM events WHERE startDate &gt;= '2018-01-30' AND dueDate &lt;= '2018-01-30'
  </code></pre>
  
  <p>But nothing is happening,I don't how to write SQL query</p>
  
  <p><strong>Expected past eventId</strong></p>
  
  <pre><code>eventId
    1
    2
  </code></pre>
  
  <p><strong>Expected upcoming eventId</strong></p>
  
  <pre><code>eventId
    3
  </code></pre>