title: Select from table where value in common with another table
body: <p>I have two tables ( <code>visited</code> and <code>purchased</code> )</p>
  <pre><code>visited -&gt; id,product,user_ip
  purchased -&gt; id,product,user_ip
  </code></pre>
  <p>which eventually have the the same value in the column <code>user_ip</code>. Example:</p>
  <pre><code>visited -&gt;
  1,product1,192.168.1.1
  2,product2,192.168.1.1
  3,product3,192.168.12.12
  4,product4,192.168.12.12
  
  purchased -&gt;
  1,product3,192.168.12.12
  </code></pre>
  <p>Is possible to select all <code>products</code> from <code>visited</code> which have <code>user_ip</code> in common with <code>purchased</code>? In the above example I would need to select <code>id3</code> and <code>id4</code>.</p>