title: sqlite3, how properly use subqueries
body: <p>I am beginner in the sql querying, could please explain me how can I solve such problem.</p>
  
  <p>Problem, lets say I have 2 tables:</p>
  
  <pre><code>Table A: has a_id_1, a_id_2
  Table_B: has b_id_1, b_id_2
  </code></pre>
  
  <p>and these tables has such records:</p>
  
  <pre><code>Table A: has (1,2)
  Table A: has (4,5)
  Table A: has (7,10)
  
  Table B: has (1,2)
  Table B: has (2,1)
  Table B: has (7,1)
  Table B: has (4,10)
  Table B: has (1,10)
  Table B: has (10,1)
  </code></pre>
  
  <p>So, my question is, how can I write query to delete records from Table B based on Table A, and if Table B record: b_id_1 != b_id_2 and b_id_2 != b_id_1 delete such record.</p>
  
  <p>I guess I have to use subqueries, but I am not sure how properly use it in this specific case.</p>
  
  <p>I am using sqlite3.</p>
  
  <p>Thank you very much for your help.</p>