Skip to content

Instantly share code, notes, and snippets.

View guillaumelachaud's full-sized avatar

Guillaume Lachaud guillaumelachaud

View GitHub Profile
@guillaumelachaud
guillaumelachaud / funnel_simple.sql
Created October 7, 2021 09:24
Simplified query
SELECT
org_id,
org_name
FROM
organization
WHERE
did(org_id, "sign_up")
AND then_did(org_id, "add_credit_card", "<=5m")
AND then_did(org_id, "signed_form", "<=5m")
AND never_did(org_id, "chat_started")
@guillaumelachaud
guillaumelachaud / funnel.sql
Last active October 5, 2021 13:49
A raw funnel SQL query
WITH
signup_occurrences AS (
SELECT
DISTINCT tracks.timestamp AS timestamp,
orgs.org_id,
tracks.event
FROM
`lazylantern.junon_webapp.tracks` tracks
LEFT JOIN
`lazylantern.junon_webapp.groups` orgs