Finding Data Where A Condition Is Met

February 02, 2015
By Bounteous

Legacy SQL

SELECT
     CONCAT(fullVisitorId, ".", STRING(visitId)) AS Session_ID,
     totals.pageviews AS Pageviews
FROM   
     [google.com:analytics-bigquery:LondonCycleHelmet.ga_sessions_20130910]
WHERE
     trafficSource.medium="organic"

Standard SQL

SELECT
     CONCAT(fullVisitorId, ".", CAST(visitId AS STRING)) AS Session_ID,
     totals.pageviews AS Pageviews
FROM   
     'google.com:analytics-bigquery.LondonCycleHelmet.ga_sessions_20130910'
WHERE
     trafficSource.medium="organic"