Skip to content

Instantly share code, notes, and snippets.

@adityawarmanfw
Last active September 30, 2020 13:04
Show Gist options
  • Save adityawarmanfw/712ef71806bbb7540b962b1ec63a886a to your computer and use it in GitHub Desktop.
Save adityawarmanfw/712ef71806bbb7540b962b1ec63a886a to your computer and use it in GitHub Desktop.
SELECT COUNT(DISTINCT user_id) AS player
FROM (SELECT * EXCEPT (sec_breakdown),
(SELECT COUNT(DISTINCT x)
FROM UNNEST(sec_breakdown) x
WHERE x > 0
) AS sec_played
FROM session_sec_breakdown
)
WHERE sec_played = length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment