$ gcloud compute images list --project google-containers --no-standard-images
$ gcloud compute instances create \--zone us-central1-a \--image-family gci-stable --image-project google-containers
$ gcloud compute ssh --zone us-central1-a
$ gcloud compute instances create \--zone us-central1-a \--image-family gci-stable --image-project google-containers \--metadata-from-file user-data=<cloud-config-file>
SELECT user_dim.app_info.app_instance_id, user_dim.device_info.device_category, user_dim.device_info.user_default_language, user_dim.device_info.platform_version, user_dim.device_info.device_model, user_dim.geo_info.country, user_dim.geo_info.city, user_dim.app_info.app_version, user_dim.app_info.app_store, user_dim.app_info.app_platformFROM [firebase-analytics-sample-data:ios_dataset.app_events_20160601]
user_dim.app_info.app_instance_id
UNION ALL
SELECT user_dim.geo_info.country as country, EXACT_COUNT_DISTINCT( user_dim.app_info.app_instance_id ) as usersFROM [firebase-analytics-sample-data:android_dataset.app_events_20160601], [firebase-analytics-sample-data:ios_dataset.app_events_20160601]GROUP BY countryORDER BY users DESC
user_properties
SELECT user_dim.user_properties.value.value.string_value as language_code, EXACT_COUNT_DISTINCT(user_dim.app_info.app_instance_id) as users,FROM [firebase-analytics-sample-data:android_dataset.app_events_20160601], [firebase-analytics-sample-data:ios_dataset.app_events_20160601]WHERE user_dim.user_properties.key = "language"GROUP BY language_codeORDER BY users DESC
SELECT event_dim.name, COUNT(event_dim.name) as event_count FROM [firebase-analytics-sample-data:android_dataset.app_events_20160601]GROUP BY event_dim.nameORDER BY event_count DESC
SELECT event_dim.params.value.int_value as virtual_currency_amt, COUNT(*) as num_times_spentFROM [firebase-analytics-sample-data:android_dataset.app_events_20160601]WHERE event_dim.name = "spend_virtual_currency"AND event_dim.params.key = "value"GROUP BY 1ORDER BY num_times_spent DESC
SELECT user_dim.geo_info.city, COUNT(user_dim.geo_info.city) as city_count FROMTABLE_DATE_RANGE([firebase-analytics-sample-data:android_dataset.app_events_], DATE_ADD('2016-06-07', -7, 'DAY'), CURRENT_TIMESTAMP()),TABLE_DATE_RANGE([firebase-analytics-sample-data:ios_dataset.app_events_], DATE_ADD('2016-06-07', -7, 'DAY'), CURRENT_TIMESTAMP())GROUP BY user_dim.geo_info.cityORDER BY city_count DESC
SELECT user_dim.app_info.app_platform as appPlatform, user_dim.device_info.device_category as deviceType, COUNT(user_dim.device_info.device_category) AS device_type_count FROMTABLE_DATE_RANGE([firebase-analytics-sample-data:android_dataset.app_events_], DATE_ADD('2016-06-07', -7, 'DAY'), CURRENT_TIMESTAMP()),TABLE_DATE_RANGE([firebase-analytics-sample-data:ios_dataset.app_events_], DATE_ADD('2016-06-07', -7, 'DAY'), CURRENT_TIMESTAMP())GROUP BY 1,2ORDER BY device_type_count DESC
user_dim.user_id
SELECT STRFTIME_UTC_USEC(eventTime,"%Y%m%d") as date, appPlatform, eventName, COUNT(*) totalEvents, EXACT_COUNT_DISTINCT(IF(userId IS NOT NULL, userId, fullVisitorid)) as usersFROM ( SELECT fullVisitorid, openTimestamp, FORMAT_UTC_USEC(openTimestamp) firstOpenedTime, userIdSet, MAX(userIdSet) OVER(PARTITION BY fullVisitorid) userId, appPlatform, eventTimestamp, FORMAT_UTC_USEC(eventTimestamp) as eventTime, eventName FROM FLATTEN( ( SELECT user_dim.app_info.app_instance_id as fullVisitorid, user_dim.first_open_timestamp_micros as openTimestamp, user_dim.user_properties.value.value.string_value, IF(user_dim.user_properties.key = 'user_id',user_dim.user_properties.value.value.string_value, null) as userIdSet, user_dim.app_info.app_platform as appPlatform, event_dim.timestamp_micros as eventTimestamp, event_dim.name AS eventName, event_dim.params.key, event_dim.params.value.string_value FROM TABLE_DATE_RANGE([firebase-analytics-sample-data:android_dataset.app_events_], DATE_ADD('2016-06-07', -7, 'DAY'), CURRENT_TIMESTAMP()),TABLE_DATE_RANGE([firebase-analytics-sample-data:ios_dataset.app_events_], DATE_ADD('2016-06-07', -7, 'DAY'), CURRENT_TIMESTAMP())), user_dim.user_properties))GROUP BY date, appPlatform, eventName
SELECT name, value/10 AS min_temperature, latitude, longitudeFROM [bigquery-public-data:ghcn_d.ghcnd_stations] AS stnJOIN [bigquery-public-data:ghcn_d.ghcnd_2016] AS wxON wx.id = stn.idWHERE wx.element = 'TMIN' AND wx.qflag IS NULL AND STRING(wx.date) = '2016-08-15'
SELECT wx.date, wx.value/10.0 AS prcpFROM [bigquery-public-data:ghcn_d.ghcnd_2015] AS wxWHERE id = 'USW00094846' AND qflag IS NULL AND element = 'PRCP'ORDER BY wx.date
wx.value
SELECT wx.date, MAX(prcp) AS prcp, MAX(tmin) AS tmin, MAX(tmax) AS tmax, IF(MAX(haswx) = 'True', 'True', 'False') AS haswxFROM ( SELECT wx.date, IF (wx.element = 'PRCP', wx.value/10, NULL) AS prcp, IF (wx.element = 'TMIN', wx.value/10, NULL) AS tmin, IF (wx.element = 'TMAX', wx.value/10, NULL) AS tmax, IF (SUBSTR(wx.element, 0, 2) = 'WT', 'True', NULL) AS haswx FROM [bigquery-public-data:ghcn_d.ghcnd_2015] AS wx WHERE id = 'USW00094846' AND qflag IS NULL )GROUP BY wx.dateORDER BY wx.date
SELECT REPLACE(date,"-","") AS date, MAX(prcp) AS prcp, MAX(tmin) AS tmin, MAX(tmax) AS tmaxFROM ( SELECT STRING(wx.date) AS date, IF (wx.element = 'PRCP', wx.value/10, NULL) AS prcp, IF (wx.element = 'TMIN', wx.value/10, NULL) AS tmin, IF (wx.element = 'TMAX', wx.value/10, NULL) AS tmax FROM [bigquery-public-data:ghcn_d.ghcnd_2016] AS wx WHERE id = 'USW00094846' AND qflag IS NULL AND value IS NOT NULL AND DATEDIFF(CURRENT_DATE(), date) < 15 )GROUP BY dateORDER BY date ASC
SELECT wx.date, wx.prcp, f.departure_delay, f.arrival_airportFROM ( SELECT STRING(date) AS date, value/10 AS prcp FROM [bigquery-public-data:ghcn_d.ghcnd_2005] WHERE id = 'USW00094846' AND qflag IS NULL AND element = 'PRCP') AS wxJOIN [bigquery-samples:airline_ontime_data.flights] AS fON f.date = wx.dateWHERE f.departure_airport = 'ORD'LIMIT 100
Math.min((Math.floor(currentCapacity/25) + 5),25)
Use promo code NEXT1720 to save $300 off general admission