-- Description:
-- Count visits in Adobe Analytics click stream data export
SELECT
DATE(date_time) AS date,
COUNT(
DISTINCT CONCAT(
CAST( post_visid_high AS string),
CAST( post_visid_low AS string),
"_",
CAST( visit_num AS string)
)
) AS visits
FROM `adobe_click_stream_data`
-- 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