title: What is the collect set equivalent in BigQuery for Standard SQL
body: <p>I have below table wherein I am trying to find an <code>array set</code> for a given <code>id</code>. I know <code>collect_set</code> is available in Hive, but I want to know its equivalent in BigQuery. I am using <code>Standard SQL</code>. </p>
  
  <p>Here is my query</p>
  
  <pre><code>with temp as (
  select "1" as id, "a" as source_field
  union all
  select "1" as id, "b" as source_field
  union all 
  select "1" as id, "b" as source_field
  )
  select id, string_agg(source_field) as op
  from temp
  group by id 
  </code></pre>
  
  <p>This returns </p>
  
  <pre><code>id   op
  1   a,b,b
  </code></pre>
  
  <p>whereas I need </p>
  
  <pre><code>id   op
  1   a,b
  </code></pre>
  
  <p>because I only want distinct members for a given <code>id</code></p>