title: How to fetch data from two related tables filter by one table?
body: <p>I need to fetch data from two tables</p>
  
  <p>For example: I have tables test1, test2. Test1 is the parent table. I need to fetch data is that present in test1 but not in test2. How can I write a query for that?</p>
  
  <pre><code>select id from test1, test2 where test1.id not in (test2.id);
  </code></pre>