title: table intersection
body: <p>how to do this? How to join so connect the table?</p>
  
  <p>Tables:</p>
  
  <pre><code>| id | p1 | dfrom | dto |
  | 1  | 1  |  2010 |2014 |
  
  | id | p2 | dfrom | dto |
  | 1  | 2  | 2013  | 2016|
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>| id | p1 | p2 | dfrom | dto |
  | 1  | 1  |null| 2010  | 2012|
  | 1  | 1  | 2  | 2013  | 2014|
  | 1  |null| 2  | 2015  | 2016|
  </code></pre>
  
  <p>Thanks in advance!</p>