SQL Query for unique visitors on Adobe Analytics click stream data

-- Description
-- Count unique visitors in Adobe Analytics click stream export

SELECT
    DATE(date_time) AS date,
    COUNT(
        DISTINCT CONCAT(
            CAST( post_visid_high AS string), 
            CAST( post_visid_low AS string)
        )
    ) AS visitors
FROM `adobe_click_stream_table`
-- only look at data for June 2022
WHERE DATE(date_time) >= "2022-06-01"
           AND DATE(date_time) < "2022-07-01"

GROUP BY date
ORDER BY date ASC

Send a Comment

Your email address will not be published.