title: Compare arrays across tables
body: <p>I'm querying some <strong><code>data (SQL, presto)</code></strong>, I'm struggling to join 2 tables. I need to know which teams the issues are associated with based on the team tags set out in the tags table. Each issue could be associated with numerous teams.</p>
  <p>Table 1 <code>team</code>:</p>
  <pre><code>name  | tags
  ------+--------------------
  team1 | [1234, 2345, 5678]
  team2 | [6789, 4321]
  team3 | [4530]
  team4 | [6532]
  team5 | [3452, 34234, 868686]
  </code></pre>
  <p>Table 2 <code>issues</code>:</p>
  <pre><code>issue_id | tags
  ---------+--------------------------------------------
     1     | [312312, 45345, 4535,1111,4533,4530, 4321 ]
     2     | [312312, 45345, 6532]
     3     | [6532]
     4     | [312312, 1234, 4321]
     5     | [312312]
  </code></pre>
  <p>I need it to look like:</p>
  <pre><code>issue_id | team
  ---------+--------
  1        | team3
  1        | team2
  2        | team4
  3        | team4
  4        | team1
  4        | team2
  </code></pre>
  <p>I'd like to avoid hardcoding as the list of <code>teams</code> and their associated <code>tags</code> can be dynamic, but not sure how to approach this problem</p>