title: Sum of integer array in AWS Athena
body: <p>I have a column contains integer array like below</p>
  
  <pre><code>{   
      "X":[-11,-11,-11,-17],
      "Y":[184,180,184,184],
      "Z":[144,140,144,142]
  }
  </code></pre>
  
  <p>I map X, Y &amp; Z as column but I didn't get the sum by using <strong>sum</strong></p>
  
  <p>I tried </p>
  
  <pre><code>SELECT X AS items,
  x_item AS (
    SELECT i AS array_items
    FROM "test_database"."quicktest", UNNEST(items) AS t(i)
  )
  SELECT array_items, sum(val) AS total
  </code></pre>
  
  <p>&amp;</p>
  
  <pre><code>select sum(X) FROM "test_database"."quicktest"
  </code></pre>
  
  <p>It's gives me the sql error &amp; something I missing!!.
  Any comments or suggestions would be much appreciated.</p>