Skip to content

Instantly share code, notes, and snippets.

View sebcachia's full-sized avatar

Sebastian Cachia sebcachia

View GitHub Profile
WITH const AS (
SELECT TIMESTAMP '2015-01-01' AS start_date
)
, saves_with_collab AS (
SELECT DISTINCT user_id, collab
FROM metrics.save_stat, const
WHERE server_datetime > const.start_date
)
, collab_users AS (
SELECT DISTINCT user_id