title: Compare two IDs / Strings in BigQuery
body: <p>Think this is a pretty basic query, but I just can't make it work.
  Found no solution yet.</p>
  
  <p>I have two tables with different data. Both tables contain a ID as a String called the clientID.</p>
  
  <p>Table <strong>A</strong> has the ID and different events and custom dimensions from all Google Analytics Sessions.</p>
  
  <pre><code>SELECT 
  clientId,
  visitNumber,
  hits.page.pagePath AS pagePath,
  trafficSource.source AS source,
  
  --Events
  SUM(CASE WHEN (hits.eventInfo.eventCategory = 'Download' AND hits.type = 
  'EVENT' AND hits.eventInfo.eventAction = 'pdf') THEN 1 ELSE 0 END) AS 
  Downloads,
  SUM(CASE WHEN (hits.eventInfo.eventLabel  = 'search-header' OR 
  hits.eventInfo.eventLabel  = 'search-mainpage') AND hits.type = 'EVENT' THEN 
  1 ELSE 0 END) AS Search,
  
  --CustomDimension
  (SELECT MAX(cd.value) FROM UNNEST(hits.customDimensions) AS cd WHERE 
  cd.index = 1) AS realURL
  
  FROM `xxxx.xxxx.ga_sessions_*` AS t, UNNEST(hits) AS hits
  
  WHERE 
  hits.page.pagePath LIKE 'news-and-media' AND _TABLE_SUFFIX BETWEEN 
   FORMAT_DATE('%Y%m%d', date '2018-05-31') AND FORMAT_DATE('%Y%m%d', date 
  '2018-10-01')
  GROUP BY 
  clientId,
  visitNumber,
  pagePath,
  source,
  realURL
  
  LIMIT 100;
  </code></pre>
  
  <p>Table <strong>B</strong> has only one column with some clientIDs. 
  So I want to match / search for the clientIDs in Table <strong>A</strong> for the clientIDs that are in Table <strong>B</strong>.
  I only want the data from Table A where the IDs matched.</p>
  
  <p>I'm using Standard SQL here. Any thoghts on how to solve this?
  Think I have to use a JOIN here, but not experienced with that.</p>