title: select updated_dates which are not between started_date and stopped_date
body: <p>I have two table one contains updated_at (can be more than one row) datetime And second contains started_date and stopped_date(one or more records).</p>
  
  <p>I want select updated_at date which should not in between started_date and stopped_date.</p>
  
  <p>Thanks in advance.</p>
  
  <p>I saw the other Question "Check overlap of date ranges in MySQL".</p>
  
  <p>But this not what I want.</p>
  
  <p>user_location  </p>
  
  <pre><code>+---+-----+-----+---------------------+
  |id | lat | lon | updated_date        |
  +---+-----+-----+---------------------+
  | 1 |16.45|75.45|2018-01-09 12:50:57  |
  | 2 |16.85|75.15|2018-01-09 12:53:45  |
  | 3 |16.78|75.25|2018-01-09 12:55:48  |
  | 4 |16.43|75.35|2018-01-09 13:57:35  |
  | 5 |16.48|75.47|2018-01-09 14:59:30  |
  | 6 |16.49|75.49|2018-01-10 05:59:58  |
  | 7 |16.50|75.50|2018-01-10 07:35:15  |
  +---+-----+-----+---------------------+
  </code></pre>
  
  <p>location_blocked_datetime</p>
  
  <pre><code>+---+--------------------+---------------------+
  |id |     start_date     |  stopped_date       |
  +---+--------------------+---------------------+
  | 1 |2018-01-09 05:55:48 | 2018-01-09 07:55:48 |
  | 2 |2018-01-09 12:51:48 | 2018-01-09 12:56:48 |
  | 3 |2018-01-10 04:30:48 | 2018-01-04 06:55:48 |
  +---+--------------------+---------------------+
  </code></pre>
  
  <p>I want select location from user_location table where updated_date should not be there in start_date and stopped_date.start_date and stopped dates are not fixed and contain more than 1 records</p>
  
  <p>The result of above query should look like this:-</p>
  
  <p>If I want to select locations On 2018-01-09</p>
  
  <p>Result Of Above Query</p>
  
  <pre><code>+---+-----+-----+---------------------+
  |id | lat | lon | updated_date        |
  +---+-----+-----+---------------------+
  | 1 |16.45|75.45|2018-01-09 12:50:57  |
  | 2 |16.43|75.35|2018-01-09 13:57:35  |
  | 3 |16.48|75.47|2018-01-09 14:59:30  |
  +---+-----+-----+---------------------+
  </code></pre>