title: How to pivot rows into columns in AWS Athena?
body: <p>I'm new to AWS Athena and trying to pivot some rows into columns, similar to the top answer in this <a href="https://stackoverflow.com/questions/15931607/convert-rows-to-columns-using-pivot-in-sql-server">StackOverflow post</a>.</p>
  <p>However, when I tried:</p>
  <pre><code>SELECT column1, column2, column3
  FROM data
  PIVOT
  (
    MIN(column3)
    FOR column2 IN ('VALUE1','VALUE2','VALUE3','VALUE4')
  )
  </code></pre>
  <p>I get the error: <code> mismatched input '(' expecting {',', ')'} (service: amazonathena; status code: 400; error code: invalidrequestexception</code></p>
  <p>Does anyone know how to accomplish what I am trying to achieve in AWS Athena?</p>