-- Step 2: Count events per song session
-- Used for filtering out sessions with too many events (>= 1000)

CREATE OR REPLACE TEMPORARY TABLE {{ web_events_per_song_session_table_name }} AS (
    SELECT
        song_session_id
        , COUNT(*) AS n_events
    FROM
        {{ web_audio_player_actions_dedup_table_name }}
    GROUP BY
        song_session_id
);
