Created
May 7, 2019 22:35
-
-
Save sbrissenden/d3f74f7e97436da627ac7305631c6ddf to your computer and use it in GitHub Desktop.
Revisions
-
sbrissenden revised this gist
May 7, 2019 . No changes.There are no files selected for viewing
-
sbrissenden created this gist
May 7, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ SELECT COUNT(distinct p.user_id) FROM `friendly--pix.projectId.firebase_predictions.YOUR_PACKAGE_NAME_ANDROID` p CROSS JOIN UNNEST (predictions) INNER JOIN `projectId.analytics_YOUR_TABLE.events_*`` a on p.user_id = a.user_id WHERE prediction_name = "churn" AND score > 0.7 AND TIMESTAMP_TRUNC(p.prediction_time, DAY) = TIMESTAMP('2018-10-04') AND a.geo.country = "France"