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
select (case when tile = 50 then 'Median' when tile = 95 then '95%' else '5%' end) as tile | |
, app_display_version | |
, max(cast( ROUND(duration/1000)/1000 as numeric) ) max_duration_s | |
, min(cast( ROUND(duration/1000)/1000 as numeric) ) min_duration_s | |
from ( | |
select | |
trace_info.duration_us duration | |
, ntile(100) over (partition by (app_display_version) order by trace_info.duration_us) tile | |
, app_display_version |
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
select (case when tile = 50 then 'Median' when tile = 95 then '95%' else '5%' end) as tile | |
, radio_type | |
, max(cast( ROUND(duration/1000) as numeric)/1000 ) max_duration_s | |
, min(cast( ROUND(duration/1000) as numeric)/1000 ) min_duration_s | |
from ( | |
select | |
trace_info.duration_us duration | |
, ntile(100) over (partition by (radio_type) order by trace_info.duration_us) tile |
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
select | |
(case when tile = 50 then 'Median' when tile = 95 then '95%' else '5%' end) as tile | |
, dt | |
, max(cast( ROUND(duration/1000) as numeric)/1000 ) max_duration_s | |
, min(cast( ROUND(duration/1000) as numeric)/1000 ) min_duration_s | |
from ( | |
select | |
trace_info.duration_us duration | |
, ntile(100) over (partition by (DATE(event_timestamp)) order by trace_info.duration_us) tile |
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
select (case when tile = 50 then 'Median' when tile = 95 then '95%' else '5%' end) as tile | |
, country | |
, max(cast( ROUND(duration/1000)/1000 as numeric) ) max_duration_s | |
, min(cast( ROUND(duration/1000)/1000 as numeric) ) min_duration_s | |
, logonCount | |
from ( | |
select | |
trace_info.duration_us duration | |
, count(trace_info.duration_us ) OVER(partition by (country)) logonCount -- you might want to use this as a sort later |
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 | |
SELECT | |
event_id, issue_id, blame_frame.file, blame_frame.line | |
FROM | |
`projectId.firebase_crashlytics.package_name_ANDROID` | |
WHERE | |
FORMAT_TIMESTAMP("%Y%m%d", TIMESTAMP_TRUNC(event_timestamp, DAY)) = '20190509' |
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
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" | |
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
SELECT COUNT(distinct p.user_id) | |
FROM `friendly--pix.projectId.firebase_predictions.YOUR_PACKAGE_NAME_ANDROID` p CROSS JOIN UNNEST (predictions) | |
WHERE | |
prediction_name = "churn" | |
AND score > 0.7 | |
AND TIMESTAMP_TRUNC(p.prediction_time, DAY) = TIMESTAMP('2018-10-04') |
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 | |
#################################################################### | |
# PART 1: Cohort of New Users starting on SEPT 1 | |
#################################################################### | |
WITH | |
new_user_cohort AS ( | |
SELECT DISTINCT user_pseudo_id as new_user_id | |
FROM | |
`projectId.analytics_YOUR_TABLE.events_*` | |
WHERE |
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
SELECT | |
AVG(trace_info.duration_us / 1000000) AS seconds_on_screen, | |
AVG(trace_info.screen_info.slow_frame_ratio) AS slow_frame_ratio, | |
AVG(trace_info.screen_info.frozen_frame_ratio) AS frozen_frame_ratio, | |
event_name as screen, | |
country | |
FROM `ibam-d6cd2.firebase_performance.iba_mobilbank_IOS` | |
WHERE _PARTITIONTIME > TIMESTAMP("2019-05-09") | |
AND event_type = "SCREEN_TRACE" | |
AND country = "FR" |
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
const MY_DOMAIN = 'rezaarkan.com'; | |
const SLUG_TO_PAGE = { | |
'': '882cd6dd6e1e482d823b464f326213e5', | |
'now': '25b7df64071d420d8f609bf76d9f4114', | |
'portfolio': '6000547bed0d441793bfba1498c063e2', | |
'resume': '0934b80d2d1544f99dedadb00be9d146', | |
'recommendations': '29115129efa44f1a870f390dd2c0a6c0', | |
'photos': 'e78c0492a5ec486aa51f4cdb2c6f4603', | |
'blog': '29bb193c1a104ba2b832788b57d58cd6', |
NewerOlder