Operations and Metric Analytics - Case Study
Operations and Metric Analytics - Case Study
By - Nitant Sharma
Project Description - Case Study 1
-> With the help of operations analysis we can find the areas which can be
improved and can predict the overall growth or decline of a company’s
fortune.
Approach
-> First step was creating a database where the dataset would be stored.
-> Next step was importing dataset present in the form of csv to MySQL
Workbench.
-> The structure of the data which is to be stored inside the table job_data
was mapped with correct data type to avoid data loss while transfer.
Number of jobs reviewed per hour per day for November 2020
Select
throughput.total_jobs_per_day,
throughput.hrs_spent
FROM(
SELECT ds,
COUNT(job_id) as total_jobs_per_day,
sum(time_spent)/3600 as hrs_spent
FROM job_data
WHERE ds>='2020-11-01' and ds<='2020-11-30'
group by 1
)throughput;
Calculate 7 day rolling average of throughput
SELECT
throughput.ds,
throughput.total_jobs_per_day as Num_of_jobs,
AVG(throughput.total_jobs_per_day) OVER (ORDER BY throughput.ds ROWS BETWEEN 6 PRECEDING
AND CURRENT ROW) AS Seven_day_moving_avg
FROM(
SELECT ds,
COUNT(job_id) as total_jobs_per_day,
sum(time_spent) as hrs_spent
FROM job_data
WHERE ds>='2020-11-01' and ds<='2020-11-30'
group by 1
)throughput;
The percentage share of each language in the
last 30 days
Select
sub.ds,
sub.`language`,
sub.count_of_language AS Count_of_languages,
(sub.count_of_language) * 100.0 /
sum(sub.count_of_language) over(ROWS BETWEEN
UNBOUNDED PRECEDING AND UNBOUNDED
FOLLOWING) AS Percentage,
sum(sub.count_of_language) over(ROWS BETWEEN
UNBOUNDED PRECEDING AND UNBOUNDED
FOLLOWING) As Total_languages
FROM(
SELECT ds,
`language`,
COUNT(job_id) as count_of_language
FROM job_data
WHERE ds>='2020-11-01' and ds<='2020-11-30'
group by `language`
)sub;
Display duplicates from the table
Select *
From
(Select *,
ROW_NUMBER() OVER(PARTITION BY job_id ORDER BY job_id) AS Row_No
From job_data) dup_sub
Where dup_sub.ROW_No > 1;
Case Study 2 - Investigating metric spike
-> In this project we will investigate the dataset further for answering the
questions asked by the team by giving them insights of the data.
SELECT user_id,
device as Device_Name,
WEEK(occurred_at) as
Weekly_Engagements,
COUNT(Case when event_type =
'engagement' then 1 ELSE NULL
END) as No_Of_Engagements
FROM events
GROUP BY
user_id,Device_Name,Weekly_Enga
gements
ORDER BY Device_Name;
Calculate the email engagement metrics
-> The Persian language had a maximum share of 37.5 among all languages.
-> The dataset contains two duplicate rows which might affect the result of data analysis.
-> From the weekly user engagement report it was known that user were least active on Week
No: 35.
-> Monthly users growth for product increase from Month No: 5 to 6.
-> Weekly users retention report will be helpful in understanding how many users are still active
on website after signing up.
-> We found out how many times users interacted with the website for the product in a week
using Weekly Engagement per device.
-> Email metrics report will help in knowing the action of the users with email i.e
sent_weekly_digest, email_open and email_clickthrough.
PPT Link
https://docs.google.com/presentation/d/1ED11eNUNn1rHUejVRAKBPNeM
uOVByrwBhTwwy2pDTdU/edit?usp=sharing
https://drive.google.com/file/d/1e659NUCNzyRQET3ZI3QDXC46v352aYck/
view?usp=sharing
Dataset Link
SQL Project-1 Table - Google Sheets