- Unique visitors:
SELECT count(host)
- Number of visits
SELECT count(*) where referer notlike '%.<yoursite>.com'
- Number of page hits
SELECT count(*) where path like '%.htm' or path like '%.html'
- Daily report of page hits
SELECT date, count(*) where path like '%.htm' or path like '%.html'
- Unique visitors broken on Date
SELECT date, count(host)
- Unique visitors broken on week
SELECT weekofyear(date), count(host)
- Get all the refering URLs
SELECT referer, count(*)
- Get all refering domains
SELECT strtok(referer, '/', 3), count(*)
- Get all the keywords from google search
SELECT urlattribute(referer, 'q'), count(*) where referer like '%.google.com/%'
- Goals
SELECT count(*) where path = '/buy.html' and host in (select host where referer like '%.google.com/%')