title: Turn all unique values of a column into a set or array in a returned column of a GROUPY BY query
body: <p>I have the following query:</p>
  
  <pre><code>SELECT COUNT(*) count, userid, displaydate 
  FROM data 
  GROUP BY userid, displaydate 
  HAVING COUNT(userid) &gt; 1
  </code></pre>
  
  <p>I would like to modify this to include another column, <code>type</code> so that I could create an array of all the unique <code>type</code> values that occur per group. So for example if I have some data like this:</p>
  
  <pre><code>userid, displaydate, type
  a,      1242242422,   0
  a,      1242242422,   1
  </code></pre>
  
  <p>How could I get the following returned:</p>
  
  <pre><code>(a, 1242242422, [0, 1])
  </code></pre>