from demo.ecommerce.data
where isnotnull(clientIpAddress) and reputationscore(clientIpAddress)>1
select split(referralUri,"/",2) as domain
select ifthenelse(statusCode>=400,"OK","ERROR") as status
group by domain, clientIpAddress, method, status
select decode(domain,
"www.logcasts.com",latlon(40.4165,-3.70256),
"www.google.com",latlon(40.6643,-73.9385),
"www.yahoo.com",latlon(-22.90642,-43.18223),
"www.bing.com",latlon(-33.86785,151.20732),
"www.logtrust.com",latlon(52.52437,13.41053)) as positionDomain
select mmcoordinates(clientIpAddress) as clientPosition
select int(avg(timeTaken)) as timeTakenAvg |