Here's the original request:
SELECT parseDate(w."date",'yyyyMMdd') AS Datum ,
w."date",
w.hour,
'WINDELBAR' AS "Reason Code" ,
w.pagePath,
w.landingPagePath,
w.exitPagePath,
w.previousPagePath,
w.nextPagePath,
CAST(entrances as integer) AS entrances,
CAST(exits as integer) AS exits,
CAST(pageviews as integer) AS pageviews
FROM (
EXEC analytics.get(
profile=>'1234567',
startDate=> '2014-01-01',
endDate=> '2014-01-07',
metrics=>'entrances,exits,pageValue,pageviews',
dimensions=>'date, hour, pagePath,landingPagePath,exitPagePath,
previousPagePath,nextPagePath'
)
) w
WHERE w."date" != '(other)' and w.pagePath Like '%login%'
To optimize query performance, we can take the filter w.pagePath Like '%login%' and move it into a filter parameter for analytics.get:
filters=>'ga:pagePath=@login;ga:date!@other'
As a result, the query will take just a minute to run!
Comments
0 comments
Please sign in to leave a comment.