Postgres have a really useful method called FILTER
which doesn't seem to be in Snowflake. In Postgres it works like this:
SELECT
user_id,
MIN(orders.started_at) FILTER (WHERE orders.sequence_in_subscription = 1) as time_of_t1
FROM platform.orders
GROUP BY 1
How would you do this in Snowflake? Is there such a concise way to do this?
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!