title: query sqlite3 2 tables joining them by one column and date period
body: <p>i have a sqlite3 database file with the following tables.</p>
  
  <pre><code>solicitari-id
             id_im
             data_inchidere
             defect
             tip_solicitare
  
  operatii_aditionale-id
                      id_im
                      data_aditionala
                      descriere
  </code></pre>
  
  <p>First table (solicitari) contains:</p>
  
  <pre><code>id , id_im, data_inchidere, defect,tip_solicitare
  ---------------------------------------------------
  1,123456,2017-01-01 10:00:00,faulty mouse,replacement
  2,789456,2017-01-01 11:00:00,pos installed,intall
  3,147852,2017-01-05 12:00:00, monitor installed,install
  4,369852,2017-01-06 11:00:00, monitor installed,install
  </code></pre>
  
  <p>Second table(operatii_aditionale) contain aditional operations:</p>
  
  <pre><code>id, id_im, data_aditionala, descriere
  ---------------------------------------------
  1,123456,2017-01-02 10:00:00,mouse replaced need cd replacement to
  2,123456,2017-01-03 10:00:00,cd replaced system ok
  3,123456,2017-01-03 10:00:00,hdd replaced system ok
  4,789456,2017-01-04 10:00:00,ac adapter not working anymore
  </code></pre>
  
  <p>What i want to do, is to build a table from these two tables but only with existing data between 2 dates wich will look like this:</p>
  
  <pre><code> id_im, data_inchidere, defect,tip_solicitare, id_im, data_aditionala, descriere
   -------------------------------------------------------------------------------
  123456,2017-01-01 10:00:00,faulty mouse,replacement,123456,2017-01-02 10:00:00,mouse replaced need cd replacement to
                                                      123456,2017-01-03 10:00:00,cd replaced system ok
                                                      123456,2017-01-03 10:00:00,hdd replaced system ok
  2,789456,2017-01-01 11:00:00,pos installed,intall,789456,2017-01-04 10:00:00,ac adapter not working anymore
  3,147852,2017-01-05 12:00:00, monitor installed,install
  4,369852,2017-01-06 11:00:00, monitor installed,install
  </code></pre>
  
  <p>I have used <code>,</code> as separator here column separator.
  I found something similar but is filling the left part for each aditional row from second table.</p>
  
  <p>Is there a method to do this directly from sqlite query command or i need to use a python script?
  btw, i need this for a python app.</p>
  
  <p>thanks</p>