title: Replicating FILTER clause from Postgres in Snowflake
body: <p>Postgres have a really useful method called <code>FILTER</code> which doesn't seem to be in Snowflake. In Postgres it works like this:</p>
  
  <pre><code>SELECT
    user_id,
    MIN(orders.started_at) FILTER (WHERE orders.sequence_in_subscription = 1) as time_of_t1
  FROM platform.orders
  GROUP BY 1
  </code></pre>
  
  <p>How would you do this in Snowflake? Is there such a concise way to do this?</p>
  
  <p>Might be quite a basic question, but I'm fairly new to the Snowflake world and have only really done Postgres before. Thanks for any help in advance!</p>