title: Select and agregate variable for distinct id in SNOWFLAKE SQL
body: <p>I have SNOWFLAKE database table with customers and their transaction types:</p>
  <pre><code>customer_id type
  1   a
  1   a
  2   b
  2   b
  2   b
  3   a
  3   b
  3   a
  </code></pre>
  <p>At output I need distinct customer id and type of transaction:</p>
  <pre><code>customer_id type
  1   a
  2   b
  3   mixed
  </code></pre>
  <p>My code does not work:</p>
  <pre><code>SELECT 
  &quot;customer_id&quot;,
  CASE WHEN type = 'a' THEN &quot;a&quot; 
  WHEN type = 'b' THEN &quot;b&quot;
  ELSE &quot;mixed&quot; END OVER (PARTITION BY &quot;customer_id&quot; )  AS &quot;type&quot;
  FROM CUSTOMERS
  </code></pre>