title: How can I aggregate values inside a jsonb array using SQL
body: <p>My data looks something like this:</p>
  <pre><code>                    tags                      |                 fullName
  ----------------------------------------------+------------------------------------------
   [&quot;tag1&quot;, &quot;tag2&quot;]                             | John
   [&quot;tag3&quot;, &quot;tag1&quot;]                             | Jane
   [&quot;tag1&quot;, &quot;tag3&quot;]                             | Bob
   
  </code></pre>
  <p>tags is a <code>jsonb</code> type and fullName a <code>text</code> in a postgres database</p>
  <p>What I'm struggling to do is, create a view such as</p>
  <pre><code>                    tags                      |                 count
  ----------------------------------------------+------------------------------------------
   tag1                                         | 3
   tag2                                         | 1
   tag3                                         | 2
   
  </code></pre>