title: Check values exist and not exist between 2 tables
body: <p>I have 3 tables, one of accounts, one of friends and another of consumers.
  Something like this:</p>
  
  <p><strong>table_accounts</strong></p>
  
  <pre><code>id | account_name
  </code></pre>
  
  <p><strong>table_friends</strong></p>
  
  <pre><code>id | account_id | people_id
  </code></pre>
  
  <p><strong>table_consumers</strong></p>
  
  <pre><code>id | account_id | people_id
  </code></pre>
  
  <p>I need to cross the following information:</p>
  
  <p>Which consumer_id coexist in both tables, something simple like this:</p>
  
  <pre><code>SELECT 
      *  
  FROM
      table_friends,
      table_consumers
  WHERE
      table_friend.account_id = 12345
      AND table_friend.account_id = table_consumers.account_id
  GROUP BY table_friend.people_id
  </code></pre>
  
  <p>this query is very slow </p>
  
  <p>Well, I now need to get what are the consumer_id's friends table, which are NOT in the consumers table. And in a third moment, find out which consumer_id does NOT exist in the friends table. But I think it's the same thing ...</p>
  
  <p>My doubt is about logic, I can not think how to cross this information.</p>