title: MySQL: How to select rows from one table between each interval taken from other table
body: <p>There are tables:</p>
  
  <pre><code>1.current_table:
  
  date        value
  02.10.2019  1
  03.10.2019  2
  04.10.2019  2
  05.10.2019 -1
  06.10.2019  1
  07.10.2019  1
  08.10.2019  2
  09.10.2019  2
  10.10.2019 -1
  11.10.2019  2
  12.10.2019  1
  
  2.intervals
  
  date_start  date_end
  02.10.2019  04.10.2019  3
  06.10.2019  09.10.2019  4
  11.10.2019  12.10.2019  2
  </code></pre>
  
  <p>"intervals" table contains maximum length of an uninterrupted sequence of positive values.
  How to select rows  from "current_table"  between each interval taken from "intervals" table (there are many of such intervals)?
  So result should be:</p>
  
  <pre><code>date        value
  02.10.2019  1
  03.10.2019  2
  04.10.2019  2   
  06.10.2019  1
  07.10.2019  1
  08.10.2019  2
  09.10.2019  2    
  11.10.2019  2
  12.10.2019  1
  </code></pre>