# NOTE: This _v2 Tinybird pipe is NOT currently in use. To make non-breaking, additive changes to the current Tinybird endpoints, modify the un-suffixed "v1" versions of the pipes instead. The _v2 pipes will be removed in a future release. # The _v2 pipes were added as part of a performance improvement experiment, which has been put on hold. TOKEN "axis" READ NODE mv_session_data_v2_0 SQL > SELECT site_uuid, session_id, countState() as pageviews, minState(timestamp) as first_pageview, maxState(timestamp) as last_pageview, argMinState(source, timestamp) as source, argMinState(device, timestamp) as device, argMinState(utm_source, timestamp) as utm_source, argMinState(utm_medium, timestamp) as utm_medium, argMinState(utm_campaign, timestamp) as utm_campaign, argMinState(utm_term, timestamp) as utm_term, argMinState(utm_content, timestamp) as utm_content FROM _mv_hits GROUP BY site_uuid, session_id TYPE materialized DATASOURCE _mv_session_data_v2