title: How to Quickly Flatten a SQL Table
body: <p>I'm using Presto. If I have a table like:</p>
  
  <pre><code>ID    CATEGORY     VALUE
  1      a           ...
  1      b
  1      c
  2      a
  2      b
  3      b 
  3      d
  3      e
  3      f
  </code></pre>
  
  <p>How would you convert to the below without writing a case statement for each combination?</p>
  
  <pre><code>ID      A     B    C    D    E    F
  1
  2
  3
  </code></pre>