50% found this document useful (2 votes)
707 views14 pages

Operation Analytics and Investigating Metric Spike

The document discusses Project 3 which analyzes operations data related to account activation dates, users, user engagement, user retention, and languages using SQL queries. The project provides insights into user engagement scenarios and the behind-the-scenes operations to understand market demand and customer retention rates. The approach used MySQL and MySQL Workbench to analyze a dataset from the trainity website by running various queries to answer questions for the project. Insights were then reflected in a PPT presentation with executed queries, answers, and explanations.

Uploaded by

kalakanishk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
50% found this document useful (2 votes)
707 views14 pages

Operation Analytics and Investigating Metric Spike

The document discusses Project 3 which analyzes operations data related to account activation dates, users, user engagement, user retention, and languages using SQL queries. The project provides insights into user engagement scenarios and the behind-the-scenes operations to understand market demand and customer retention rates. The approach used MySQL and MySQL Workbench to analyze a dataset from the trainity website by running various queries to answer questions for the project. Insights were then reflected in a PPT presentation with executed queries, answers, and explanations.

Uploaded by

kalakanishk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Project 3 : Operation Analytics

and Investigating Metric Spike

This project utilises various SQL queries to analyse the data of


operations and events related to its account activation date, users,
user engagement, user retention and languages.

The project provides very good insight into the user engagement
scenario and behind the scenes of the operations involved and
their key involvement in understanding market demand and
retention rates of customers.
Kanishk Kala
[email protected]
+91 8130299492
Approach
• I installed mysql and mysql workbench on my laptop, and
created the initial setup, made a local host and setup my
password.

• After accessing the dataset from the trainity website and


running it on mysql workbench, the dataset was ready to be
analysed.

• I ran various queries giving me answers to the various


questions involved as part of the project.

• And finally after getting the suitable answers, I have reflected


the result in this PPT with a brief explanation: One question per
slide (with executed queries, its answer and explanation)
Tech Stack Used
Technologies used:
1. Mysql: Mysql was used to run the queries which would give
me answers to the questions asked as part of the project.
2. Mysql workbench: Mysql workbench was used to run the
whole database and execute it to the mysql.
3. PPT: PPT used for making reports about the extracted data
and what I conclude from that data.
Insights
Insights Taken from each Question explained in Brief in the
following slides
I ) A) Your Task: Write an SQL
query to calculate the number of
Answer:
jobs reviewed per hour for each day no_of_jobs dates
in November 2020.
2 11/30/2020
Solution:- SELECT COUNT(*) AS 2 11/28/2020
no_of_job, ds AS dates FROM 1 11/29/2020
job_data GROUP BY ds ORDER BY
no_of_job DESC; 1 11/27/2020
1 11/26/2020
Insight: The following tables
shows that in total there were 8 1 11/25/2020
jobs, 2 of which were reviewed on
30th nov and 28th nov each and
rest 1 each were reviewed on
29th,27th,26th, and 25th nov each.
A) 2) Your Task: Write an SQL query to
calculate the 7-day rolling average of
throughput. Additionally, explain whether
you prefer using the daily metric or the 7-
day rolling average for throughput, and
why. Answer:
Solution:-
Weekly Throughput->
SELECT Weekly Throughput->
ROUND(COUNT(event)/sum(time_spent) , 0.03
2) as WeeklyThroughput FROM job_data;

Daily Throughput-> Daily Throughput ->


SELECT ds AS Dates,
ROUND(COUNT(event)/sum(time_spent),2 11/25/2020 0.02
) as DailyThroughput FROM job_data 11/26/2020 0.02
GROUP BY ds ORDER BY ds;
11/27/2020 0.01
Insight: Getting these metrics on day 11/28/2020 0.06
to day basis helps as these metrics
11/29/2020 0.05
change everyday which will not be
noticeable in Weekly throughput. 11/30/2020 0.05
Hence, Daily Throughput is better
A) 3) Your Task: Write an SQL
query to calculate the percentage
share of each language over the last
30 days. Answer:
Solution:- select language as
Languages,
round(100*count(*)/(select count(*) Languages percentage_share
from job_data),2) as
percentage_share Persian 37.50
from job_data
group by language Italian 12.50
order by language desc; Hindi 12.50

French 12.50
Insight: The table shows the
percentage share of each English 12.50
language. From the retrieved data
it can be seen that the maximum Arabic 12.50
percentage share is of persian
language at 37.50%.
D) Your Task: Write an SQL query
to display duplicate rows from
the job_data table.

Solution:- SELECT actor_id as UserID,


COUNT(*) as Duplicate Answer:
FROM job_data
GROUP BY actor_id
HAVING COUNT(*) > 1

Insight: User number 1003 has UserID Duplicate


been imported twice into the 1003 2
jobs_data table hence one of
them has to removed.
II ) A) Your Task: Write an SQL
query to calculate the weekly user
engagement.
Solution:- SELECT
'events' AS source, Answer:
event_type AS event,
COUNT(*) AS count
FROM
events
GROUP BY Source Event Count
event_type
UNION ALL Events Engagement 33203
SELECT
'email_events' AS source,
action AS event,
events signup_flow 3680
COUNT(*) AS count
FROM
email_events sent_weekly_digest 10762
email_events
GROUP BY
action; email_events email_open 3223
Insight: The solution table gives
us insight into all the activities the email_events email_clickthrough 1141
user is participating in too access
the maximum user base in the
future marketing campaigns faster
then the competitors
B) Your Task: Write an SQL query
to calculate the user growth for the
product.
Answer:
Solution:- select
*,new_user_activated-
lag(new_user_activated) over( order
by year_,quarter_ ) as user_growth
from(select year(created_at) as year_ quarter_ new_user_activated user_growth
year_,quarter(created_at) as 2013 1 470 NULL
quarter_,count(user_id) as 2013 2 608 138
new_user_activated from users 2013 3 930 322
where activated_at is not null and
2013 4 1275 345
state='active'group by 1,2)a ;
2014 1 1692 417
2014 2 2378 686
Insight: After reaching its
2014 3 2028 -350
maximum point in 2014, later on
in that year itself, a sharp decline
can be seen which needs a
serious overlook, its cause and
customer reacquisition strategies
are needed to be made.
C) Your Task: Write an SQL query to calculate the weekly retention of users based on their sign-up cohort.

Answer:

Cohort Weekly Retention


4000

3500

3000

2500
Axis Title

2000

1500

1000

500

0
0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84

cohort_retained

Insight: The management will have to put huge money on marketing campaigns as the user retention is dangerously low and has been continuously dropping since
the very first week till the point that after 85 weeks there are only 2 users left
D) Your Task: Write an SQL query
Answer:
to calculate the weekly engagement
per device.
device_name avg_weekly_users avg_times_used_weekly
macbook pro 693.0000 790.0000

Solution:- Select device_name, lenovo thinkpad 446.0000 512.0000


iphone 5 338.0000 376.0000
avg(num_users_using_device) as
macbook air 335.0000 362.0000
avg_weekly_users, samsung galaxy s4 248.0000 269.0000
avg(times_device_use_current_week) as dell inspiron notebook 219.0000 230.0000
avg_times_used_weekly From(select iphone 5s 210.0000 228.0000
week(occurred_at) as week, device as nexus 5 191.0000 215.0000

device_name , count(distinct user_id) as ipad air 151.0000 162.0000

num_users_using_device, count(device) as asus chromebook 127.0000 152.0000


iphone 4s 127.0000 151.0000
times_device_use_current_week from events
dell inspiron desktop 117.0000 131.0000
where event_name='login’ group by 1,2 order by acer aspire notebook 114.0000 125.0000
num_users_using_device desc) a group by 1; nexus 7 111.0000 116.0000
hp pavilion desktop 102.0000 110.0000
nexus 10 81.0000 85.0000
ipad mini 77.0000 85.0000

Insight: The highest engagement nokia lumia 635


acer aspire desktop
75.0000
64.0000
78.0000
67.0000
is on the Macbook pro and the windows surface 63.0000 65.0000

lowest is on the Samsung galaxy kindle fire


htc one
58.0000
57.0000
62.0000
59.0000
tablet. Hence, more marketing mac mini 48.0000 51.0000

and user reachability is required samsung galaxy note


amazon fire phone
40.0000
38.0000
44.0000
40.0000
in the tablet section from samsumg galaxy tablet 31.0000 34.0000

Samsung.
E) Your Task: Write an SQL query
to calculate the email engagement Answer:
metrics.

Solution:- SELECT

'email_events' AS source,
action AS event, Source Event Count
COUNT(*) AS count email_events sent_weekly_digest 10762
FROM
email_events email_events email_open 3223
GROUP BY
action;
email_events email_clickthrough 1141

Insight: We get the different


events and their counts from this
table giving us a brief idea of what
function of email attracts the
maximum user base.
Result
• I learned how to handle medium sized databases on mysql and
mysql workbench. Learned and played around various new
keywords and functions of Mysql while executing queries.
• I got to understand how complex mysql queries are run to
extract crucial data such as user retention rate and user
engagements.
• This helped me realise how beneficial small chunks of data can
be if one has the knowledge of mysql and has the ability to
extract valuable insights about the product from that dataset.
• Finally, I learned how mysql can be used to create reports
which can be used by the upper management and helps them
make the decision making process faster.

You might also like