Sample Query for joining two tables: CRM data and GA session data.
Full Query:
SELECT
crm.customerId AS customerId,
crm.gender AS gender,
crm.age AS age,
crm.educationLevel AS educationLevel,
crm.memberType AS memberType,
ga.operatingSystem AS operatingSystem,
ga.deviceLanguage AS deviceLanguage,
ga.screenResolution AS screenResolution
FROM (
SELECT
customerId,
gender,
age,
educationLevel,
memberType
FROM
[mydata_samples.crm_data]
) AS crm
INNER JOIN (
SELECT
device.operatingSystem AS operatingSystem,
device.language AS deviceLanguage,
device.screenResolution AS screenResolution,
customDimensions.value AS customerId
FROM
[68379989.ga_sessions_20140208],
[68379989.ga_sessions_20140207],
[68379989.ga_sessions_20140206],
[68379989.ga_sessions_20140205],
[68379989.ga_sessions_20140204],
[68379989.ga_sessions_20140203],
[68379989.ga_sessions_20140202],
[68379989.ga_sessions_20140201],
[68379989.ga_sessions_20140131],
[68379989.ga_sessions_20140130],
[68379989.ga_sessions_20140129],
[68379989.ga_sessions_20140128]
WHERE
customDimensions.index = 5
GROUP BY
1,
2,
3,
4
) AS ga
ON
crm.customerId = ga.customerId
Song in video:
"Cantina Rag" by Jackson F. Smith
http://freemusicarchive.org/music/Jackson_F_Smith/Jackson_Frederick_Smith/Cantina_Rag