title: Count E-Mails from 2 tables
body: <p>Finding it challenging to solve this</p>
  
  <p>Table 1 has usersids (around 2 Million)</p>
  
  <p>Table 2 has all user ids with email addresses (around 150 Million)</p>
  
  <p>Table 3 has email addresses (around 100  users who are subscribed to a certain email program)</p>
  
  <p>Need to count users from table 1 who are subscribed vs. not subscribed to the email program.</p>
  
  <p>I tried</p>
  
  <pre><code>select b.email_address
  from
  table_1 a
  left outer join table_2 b
  on a.user_id = b.user_id
  intersect
  select email from table_3
  </code></pre>
  
  <p>but this is an incorrect way. I need to get exact count of subscribers to email program. Any help appreciated.</p>