0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
posthog/ee/clickhouse/sql/actions.py
Tim Glaser a07eed7d2e
Simplify action queries (#2167)
* Simplify funnel and action query

* Fix type errors

* Update test_action.py

* Move more over to avoid_loop

* Simplify query everywhere

* Fix black

* Fix

* Fix everything

* Fix black

* Fix filtering

* Move or join
2020-11-03 16:06:25 +01:00

16 lines
301 B
Python

ACTION_QUERY = """
SELECT
events.uuid,
events.event,
events.properties,
events.timestamp,
events.team_id,
events.distinct_id,
events.elements_chain,
events.created_at
FROM events
WHERE {action_filter}
AND events.team_id = %(team_id)s
ORDER BY events.timestamp DESC
"""