title: sql how to convert multi select field to rows with totals
body: <p>I have a table that has a field where the contents are a concatenated list of selections from a multi-select form.  I would like to convert the data in this field into in another table where each row has the text of the selection and a count the number of times this selection was made.
  eg.</p>
  <p>Original table:</p>
  <pre><code>id    selections
  1     A;B
  2     B;D
  3     A;B;D
  4     C
  </code></pre>
  <p>I would like to get the following out:</p>
  <pre><code>selection   count
  A           2
  B           3
  C           1
  D           2
  </code></pre>
  <p>I could easily do this with split and maps in javascript etc, but not sure how to approach it in SQL. (I use Postgresql)  The goal is to use the second table to plot a graph in Google Data Studio.</p>