Operation Analytics and Investigating Metric Spike Analysis
Operation Analytics and Investigating Metric Spike Analysis
Output:
ds no_of_jobs jobs_reviewed
2020-11-25 1 0.0125
2020-11-26 1 0.0156
2020-11-27 1 0.0289
2020-11-28 2 0.0092
2020-11-29 1 0.0052
2020-11-30 2 0.0111
B) Throughput:
select job_data.ds,count(job_data.job_id) as no_of_jobs,AVG(COUNT(job_data.job_id))
over(order by ds rows between 6 preceding and current row) as throughput from job_data
GROUP by ds;
ds no_of_jobs throughput
2020-11-25 1 1.0000
2020-11-26 1 1.0000
2020-11-27 1 1.0000
2020-11-28 2 1.2500
2020-11-29 1 1.2000
2020-11-30 2 1.3333
D) Duplicate rows:
select * from (select *, row_number() over(PARTITION by job_data.job_id) as row_num from
job_data ) a where row_num > 1;
week weekly_user_engagement
17 887
18 1985
19 2030
20 2093
21 1986
22 2157
23 2188
24 2265
25 2244
26 2266
27 2397
28 2493
29 2433
30 2583
31 2278
32 2098
33 2071
34 2052
35 104
B) User Growth:
C) Weekly Retention: