Last active
June 15, 2023 13:57
-
-
Save joshreini1/45797bdebbb3da2f016e141e2741bac0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#standardSQL | |
CREATE MODEL 'bqml_tutorial.sample_model' | |
OPTIONS(model_type='boosted_tree_classifier') AS | |
SELECT | |
IF(totals.transactions IS NULL, 0, 1) AS label, | |
IFNULL(device.operatingSystem, "") as os, | |
device.isMobile AS is_mobile, | |
IFNULL(geoNetwork.country, "") AS country, | |
IFNULL(totals.pageviews, 0) AS pageviews | |
FROM | |
'bigquery-public-data.google_analytics_sample.ga_sessions_*' | |
WHERE | |
_TABLE_SUFFIX BETWEEN '20160801' AND '20170630' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment