```sql SELECT blob2 as page, blob3 as referrer, -- or what the blob is for referrer SUM(_sampl

SELECT
  blob2 as page,
  blob3 as referrer, -- or what the blob is for referrer
  SUM(_sample_interval) as pageviews,
  (COUNT(DISTINCT blob1) * _sample_interval) as visitors
FROM ANALYTICS2
WHERE index1 = 'bloggy.io' AND formatDateTime(timestamp, '%Y-%m-%d') = '2023-01-22'
GROUP BY page, referrer, _sample_interval
Was this page helpful?