This is a translated query which can be run on Snowflake. Originally written by Jonathan Hsu (Tribe Capital), who shared the same analytical pattern to run in PostgreSQL, linked on this blog post:
https://tribecap.co/a-quantitative-approach-to-product-market-fit/