title: Create Table SQL based on Dates
body: <p>I'm looking for a script to create an new table based on an other.</p>
  
  <p>Input table:<br/>
  <img src="https://i.stack.imgur.com/GiIJ5.png" alt="Input table:"></p>
  
  <p>OutputTable:<br/>
  <img src="https://i.stack.imgur.com/6ZRq4.png" alt="Output table:">
  <br/>
  Original was built in QlikView but now I have to convert it to SQL</p>