Skip to content

Instantly share code, notes, and snippets.

@adityawarmanfw
Last active September 30, 2020 13:28
Show Gist options
  • Save adityawarmanfw/8b11828231a54c6cca76758599aea98d to your computer and use it in GitHub Desktop.
Save adityawarmanfw/8b11828231a54c6cca76758599aea98d to your computer and use it in GitHub Desktop.
WITH session_sec_breakdown AS (
SELECT title,
user_id,
length,
play_session,
ARRAY_CONCAT_AGG(second_breakdown) AS sec_breakdown
FROM start_stop
GROUP BY 1,2,3,4
)
SELECT * FROM session_sec_breakdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment