title: Group by from the elements of array in AWS Athena
body: <p>I have a table which has two columns. The table has the following schema</p>
  <pre><code>column_name ---&gt; type
  student_id  ---&gt; int
  subjects    ---&gt; array&lt;string&gt;
  </code></pre>
  <p>The sample data is:</p>
  <pre><code>student_id  ---&gt;  subjects
  10          ---&gt;  [Math, Science]
  20          ---&gt;  [Math, English]
  30          ---&gt;  [English, French]
  </code></pre>
  <p>I want to group by the individual subject that is I want to count the number of subjects that all the students have taken. So my expected result is</p>
  <pre><code>Math     ---&gt; 2
  Science  ---&gt; 1
  English  ---&gt; 2
  French   ---&gt; 1
  </code></pre>
  <p>I have heard about <code>unnest</code> an array, but not able to get this result.</p>
  <p>How should I approach this?</p>