0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
posthog/ee/clickhouse/sql/funnels/step_action.py
Eric Duong 5bb713626b
Use jsonextract for steps in funnel query (#2040)
* use json extract inside steps for funnelq eury

* remove print

* fix broken query and add person prop filtering in funnel with test
2020-10-27 17:52:12 +01:00

10 lines
327 B
Python

STEP_ACTION_SQL = """
arrayFilter(
(timestamp, event, uuid, properties {person_prop_param}) ->
{is_first_step} AND
(team_id = {team_id}) AND
uuid IN ({actions_query}) {filters}
, timestamps, eventsArr, event_ids, event_props {person_prop_arg}
)[1] AS step_{step}
"""