0% found this document useful (0 votes)
84 views

Archit Patel - Analysis File

The document contains transaction data for 10 customers over time. It includes fields like Group ID, Transaction ID, date, type (new, upgrade, downgrade, churn), monthly recurring revenue (MRR) change, entry and exit plans. The assignment is to (1) calculate cumulative MRR for each customer as of 1/1/2018, (2) identify issues in the data, (3) determine the current plan for a customer, and (4) write SQL queries to analyze the data.

Uploaded by

Jashvant Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Archit Patel - Analysis File

The document contains transaction data for 10 customers over time. It includes fields like Group ID, Transaction ID, date, type (new, upgrade, downgrade, churn), monthly recurring revenue (MRR) change, entry and exit plans. The assignment is to (1) calculate cumulative MRR for each customer as of 1/1/2018, (2) identify issues in the data, (3) determine the current plan for a customer, and (4) write SQL queries to analyze the data.

Uploaded by

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

Group_ID Txn_ID Txn_date Txn_type MRR_Change Entry_Plan Exit_Plan

9554 5 4/1/2016 Upgrade 28 5 4


9554 8 5/1/2016 Downgrade -62 3 5
9554 18 11/1/2016 Churn -37 2
8892 24 4/1/2017 New 645 20
8892 26 5/1/2017 Downgrade -281 10 19
8892 28 6/1/2017 Churn -602 19
9823 19 1/1/2017 New 697 23
9823 21 2/1/2017 Upgrade -52 20 23
9823 23 3/1/2017 Addition 602 19
9823 25 4/1/2017 Churn -602 19
9823 27 5/1/2017 Churn -645 20
10902 1 1/1/2015 New 479 15
10902 20 1/1/2017 Churn -479 15
10902 22 2/1/2017 Repurchase 645 20
10902 29 6/1/2017 Addition 479 15
10902 32 9/1/2017 Downgrade -166 15 20
10902 53 12/1/2018 Churn -479 15
7878 2 1/1/2016 New 194 6
7878 9 5/1/2016 Upgrade -50 5 6
7878 30 7/1/2017 Churn 194 6
7878 31 8/1/2017 New 144 5
7878 33 9/1/2017 Downgrade -28 4 5
7878 38 10/1/2017 Churn -116 4
10090 3 1/1/2016 New 557 18
10090 4 2/1/2016 Downgrade -78 15 18
10090 11 6/1/2016 Upgrade 166 20 15
10090 34 9/1/2017 Churn -645 20
10090 39 10/1/2017 Repurchase 666 21
190290 6 4/1/2016 New 260 8
190290 10 5/1/2016 Upgrade 31 9 8
190290 12 7/1/2016 Downgrade -76 7 9
190290 13 9/1/2016 Addition 260 8
190290 15 10/1/2016 Churn -260 8
19198 7 4/5/2016 New 406 12
19198 14 9/8/2016 Addition 479 15
19198 16 10/10/2016 Churn -406 12
19198 17 11/10/2016 Downgrade -158 10 15
19198 35 9/1/2017 Churn -321 10
19198 36 9/13/2017 Repurchase 321 10
19198 37 9/28/2017 Downgrade 85 12 10
19198 40 28/10/2017 Churn -406 12
19198 41 26/11/2017 Addition 321 10
2001 42 1/12/2018 New 458 14
2001 43 2/11/2018 Downgrade -137 10 14
2001 44 3/13/2018 Churn -321 10
118928 45 3/28/2018 New 645 20
118928 46 4/17/2018 Upgrade 143 25 20
118928 47 5/12/2018 Downgrade -143 20 25
118928 48 6/11/2018 Addition 666 21
118928 49 7/1/2018 Upgrade 31 23 21
118928 50 7/6/2018 Upgrade 91 25 23
118928 51 7/11/2018 Downgrade -231 18 25
118928 52 7/16/2018 Churn -645 20
Plan ID MRR
1 $10
2 $37
3 $82
4 $116
5 $144
6 $194
7 $215
8 $260
9 $291
10 $321
11 $371
12 $406
13 $422
14 $458
15 $479
16 $523
17 $543
18 $557
19 $602
20 $645
21 $666
22 $681
23 $697
24 $739
25 $788
Context:
Data Tabs:
-- Txns Data has the transactions data for 10 customers over their lifetime
-- Plan Prices tab shows you all the plans we offer and what their prices / mo. are. All plans are billed mont

Key Definitions
-- Group ID: This is the unique identifier for the customer
-- Txn ID: This is the unique identifier for each transaction
-- Txn Date: This is the date the transaction occured
-- Txn_Type:
New: Customer has bought a subscription for the first time ever.
Upgrade: Customer has upgraded his/her existing subscription to one with a higher price
Downgrade: Customer has downgraded his/her existing subscription to one with a lower price
Addition: Customer has purchased an additional plan while currently paying for a plan. Post addition txn, customer will be
Churn: When a customer discontinues a plan, he/she is marked as churn. In the case where a customer has > 1 plan acti
Repurchase: Former customer has a bought a subscription. Repurchase can only occur post a Churn entry. If a customer
*Until the next transaction occurs, you can assume the customer is paying what he/she was paying as off t

-- MRR refers to Monthly Recurring Revenue. It's the revenue billed each month for the subscription servic
Link
-- MRR_Change is the incremental revenue change in the customer's subscription over and above the previous transaction. So
You can reference the "entry" and "exit" plan IDs in the Txns Data and look them up in Plan Prices to calculate the MRR_Cha
-- Cumulative MRR can be calculated by summing up MRR_Change entries for that customer in chronological order. This is th
-- Entry & Exit Plans tells you which plan the customer has bought vs. discontinued for each transaction

ARR refers to Annual Recurring Revenue. It's calculated as (Cumulative MRR*12)


NRR refers to Net Retention Rate. It is calculated as mentioned below:

NRR for year XXXX = Exit ARR at year end XXXX for the same customer cohort from year (X
Exit ARR at year end (X

e.g. NRR for Dec 2019 = Exit ARR at Dec 2019 end for the same customer cohort from Dec
Exit ARR at Dec 2018

Assignment
1. Calculate the cumulative paying MRR for each of the 10 customers as of 01/01/2018. This is what these customers
2. There
3. What areareyour observations
multiple about
other issues the Txns
in the cumulative MRR ofCan
Data dataset. these customers?
you spot all theUsing Txns
issues? ForData or please
each, Plan Pr
(Hint: It's easier to spot these if you go through txns in a chronological order for each customer)
4. What plan is customer with group ID 118928 currently active on?
5. Please write query in SQL to solve the below set of questions:
a) Solve the 1st problem using SQL. The solution should include the following fields: Group_ID, Cumulativ
b) For the customers who are not churned, what is the current active plan and what is the MRR of the curre
c) Find the Trailing 12 months NRR from Dec 2017 to Dec 2018. The solution should include "Month" and
. All plans are billed monthly.

st addition txn, customer will be active on >1 plans


e a customer has > 1 plan active, discontinuation for each plan is tagged as a seperate "churn" entry.
st a Churn entry. If a customer churns and buys a plan post churning, he/she is tagged as "Repurchase"
he/she was paying as off the last transaction. For instance, if the latest transaction was Upgrade on plan 11 --> we ca

or the subscription service. Click on the link below to learn more about MRR and SaaS metrics.
ve the previous transaction. So If a customer buys a plan for $20/mo. and then upgrades to a plan which is $30/mo., the MRR_change for th
ces to calculate the MRR_Change
chronological order. This is the total amount / month the customer is paying us at a point in time.

stomer cohort from year (XXXX-1) who had non 0 exit ARR at year end (XXXX-1)
Exit ARR at year end (XXXX-1)

ustomer cohort from Dec 2018 end who had non 0 exit ARR at Dec 2018 end
Exit ARR at Dec 2018 end

This is what these customers would be paying us as of that date.


sing Txns
ssues? Data
For or please
each, Plan Prices data,
provide theplease explain
Txn ID, issue,how
and you
howwill
youcorrect
would the cumulative
go about MRRs
correcting it.of some of these custo
ach customer)

ds: Group_ID, Cumulative MRR


at is the MRR of the current active plan?
ould include "Month" and "NRR" as fields (Hint: Query can have 2 parts: one for the Last year Group IDs - Denomina
rade on plan 11 --> we can assume the customer is still currently active on plan 11

30/mo., the MRR_change for this transaction will be $30-$20 = $10/mo..

Rs of some of these customers.

ar Group IDs - Denominator; and one for the retained Group IDs - numerator)
Group_ID Txn_ID Txn_date Txn_type Entry_Plan_Value MRR_Change
2001 42 1/12/2018 New 458 458
2001 43 2/11/2018 Downgrade 321 -137
2001 44 3/13/2018 Churn 0 -321
7878 2 1/1/2016 New 194 194
7878 9 5/1/2016 Upgrade 144 -50
7878 30 7/1/2017 Churn 194 194
7878 31 8/1/2017 New 144 144
7878 33 9/1/2017 Downgrade 116 -28
7878 38 10/1/2017 Churn 0 -116
8892 24 4/1/2017 New 645 645
8892 26 5/1/2017 Downgrade 321 -281
8892 28 6/1/2017 Churn 0 -602
9554 5 4/1/2016 Upgrade 144 28
9554 8 5/1/2016 Downgrade 0 -62
9554 18 11/1/2016 Churn 0 -37
9823 19 1/1/2017 New 697 697
9823 21 2/1/2017 Upgrade 645 -52
9823 23 3/1/2017 Addition 602 602
9823 25 4/1/2017 Churn 0 -602
9823 27 5/1/2017 Churn 0 -645
10090 3 1/1/2016 New 557 557
10090 4 2/1/2016 Downgrade 479 -78
10090 11 6/1/2016 Upgrade 645 166
10090 34 9/1/2017 Churn 0 -645
10090 39 10/1/2017 Repurchase 666 666
10902 1 1/1/2015 New 479 479
10902 20 1/1/2017 Churn 0 -479
10902 22 2/1/2017 Repurchase 645 645
10902 29 6/1/2017 Addition 479 479
10902 32 9/1/2017 Downgrade 479 -166
10902 53 12/1/2018 Churn 0 -479
19198 7 4/5/2016 New 406 406
19198 14 9/8/2016 Addition 479 479
19198 16 10/10/2016 Churn 0 -406
19198 17 11/10/2016 Downgrade 321 -158
19198 35 9/1/2017 Churn 0 -321
19198 36 9/13/2017 Repurchase 321 321
19198 37 9/28/2017 Downgrade 406 85
19198 40 28/10/2017 Churn 0 -406
19198 41 26/11/2017 Addition 321 321
118928 45 3/28/2018 New 645 645
118928 46 4/17/2018 Upgrade 788 143
118928 47 5/12/2018 Downgrade 645 -143
118928 48 6/11/2018 Addition 666 666
118928 49 7/1/2018 Upgrade 697 31
118928 50 7/6/2018 Upgrade 788 91
118928 51 7/11/2018 Downgrade 557 -231
118928 52 7/16/2018 Churn 0 -645
190290 6 4/1/2016 New 260 260
190290 10 5/1/2016 Upgrade 291 31
190290 12 7/1/2016 Downgrade 215 -76
190290 13 9/1/2016 Addition 260 260
190290 15 10/1/2016 Churn 0 -260
MRR Entry_Plan Exit_Plan Status This sheet was created after sorting
458 14
321 10 14
0 10 Inactive
194 6 Three new columns has been added
144 5 6
338 6
482 5
454 4 5
338 4 Active
645 20
364 10 19
-238 19 Active
28 5 4
-34 3 5
-71 2 Active
697 23
645 20 23
1247 19
645 19
0 20 Inactive
557 18
479 15 18
645 20 15
0 20
666 21 Active
479 15
0 15
645 20
1124 15
958 15 20
479 15 Active
406 12
885 15
479 12
321 10 15
0 10
321 10
406 12 10
0 12
321 10 Active
645 20
788 25 20
645 20 25
1311 21
1342 23 21
1433 25 23
1202 18 25
557 20 Active
260 8
291 9 8
215 7 9
475 8
215 8 Active
This sheet was created after sorting the Txns_raw_data file and few columns were added/sorted for my understanding
Txn_Type Issue
MRR Issue

Three new columns has been added


Entry_Plan_Value
MRR
Status
understanding
1. Calculate the cumulative paying MRR for each of the 10 customers as of 01/01/2018. This is what these customers
Added in the PPT

2. What are your observations about the cumulative MRR of these customers? Using Txns Data or Plan Pr
Added in the PPT
3. There are multiple other issues in the Txns Data dataset. Can you spot all the issues? For each, please
(Hint: It's easier to spot these if you go through txns in a chronological order for each customer)
Added in the PPT

4. What plan is customer with group ID 118928 currently active on?


18

SQL
a) Solve the 1st problem using SQL. The solution should include the following fields: Group_ID, Cumulativ
b) For the customers who are not churned, what is the current active plan and what is the MRR of the curre
c) Find the Trailing 12 months NRR from Dec 2017 to Dec 2018. The solution should include "Month" and

A SQL Tab has been created which gives idea about the subqueries written in order to write queries for the above 3 questions
Main subqueries have been added to the PPT
s is what these customers would be paying us as of that date.

g Txns Data or Plan Prices data, please explain how you will correct the cumulative MRRs of some of these custome

ues? For each, please provide the Txn ID, issue, and how you would go about correcting it.
h customer)

: Group_ID, Cumulative MRR


is the MRR of the current active plan?
d include "Month" and "NRR" as fields (Hint: Query can have 2 parts: one for the Last year Group IDs - Denominator;

for the above 3 questions


of some of these customers.

Group IDs - Denominator; and one for the retained Group IDs - numerator)
How to find if the customer is still active or not?
SELECT group_id
FROM transactions
GROUP BY group_id
HAVING SUM(CASE WHEN txn_type IN ('New','Addition','Repurchase') THEN 1 ELSE 0 END) > SUM(CASE WHEN

Creating MRR Column


SELECT *, SUM(mrr_change) OVER (PARTITION BY group_id ORDER BY txn_id) AS MRR
FROM transactions

For the customers who are not churned, what is the current active plan and what is the MRR of the
WITH Entry AS (SELECT group_id As gpi, entry_plan , count(*) AS entry_count
FROM transactions
WHERE entry_plan IS not NULL
GROUP BY group_id, entry_plan
               ),
Exit_1 AS (SELECT group_id, exit_plan , count(*) AS exit_count
FROM transactions
WHERE exit_plan IS NOT NULL
GROUP BY group_id, exit_plan
               )
SELECT gpi, entry_plan
FROM Entry 
LEFT JOIN Exit_1  ON Entry.entry_plan = Exit_1.exit_plan and Entry.gpi = Exit_1.group_id 
LEFT JOIN prices ON Entry.entry_plan = prices.plans
WHERE entry_count > exit_count OR exit_count IS NULL
ORDER BY gpi, entry_plan

Active Customers As of end of Dec 2017


SELECT group_id
FROM transactions
WHERE txn_date <= '2017-12-12'
GROUP BY group_id
HAVING SUM(CASE WHEN txn_type IN ('New','Addition','Repurchase') THEN 1 ELSE 0 END) > SUM(CASE WHEN txn_type

Active Customers As of end of Dec 2018


SELECT group_id
FROM transactions
WHERE txn_date <= '2018-12-12'
GROUP BY group_id
HAVING SUM(CASE WHEN txn_type IN ('New','Addition','Repurchase') THEN 1 ELSE 0 END) > SUM(CASE WHEN txn_type

Month Difference between two transactions:


SELECT group_id, txn_date, mrr_change, datediff(month,txn_date,lead(txn_date,1) OVER (PARTITION BY group_id ORDER
FROM transactions

How to calculate the MRR and no. of months between two consecutive transactions
SELECT *,
SUM(mrr_change) OVER (PARTITION BY group_id ORDER BY txn_date) AS MRR,
datediff(month,txn_date, lead(txn_date) OVER (PARTITION BY group_id ORDER BY txn_date)) AS months
FROM transactions
E 0 END) > SUM(CASE WHEN txn_type = 'Churn' THEN 1 ELSE 0 END)

what is the MRR of the current active plan?

t_1.group_id 

SUM(CASE WHEN txn_type = 'Churn' THEN 1 ELSE 0 END)

SUM(CASE WHEN txn_type = 'Churn' THEN 1 ELSE 0 END)

TITION BY group_id ORDER BY txn_id))

txn_date)) AS months
Date_order Start_Date Group_ID
1 1/1/2015 10902 4/1/2016 9554
1/1/2016 7878 4/1/2017 8892
2 1/1/2016 10090
3 4/1/2016 190290 We are not aware of the acquisition date for the above two customers
4 4/5/2016 19198 Acquisition Date - Date on which the customer subscribed for the first
5 1/1/2017 9823 Txn_type = "New" to know the Start_Date of customer
7 1/12/2018 2001
8 3/28/2018 118928

Purchase Cancellations
2015 1 0
2016 4 0
2017 1 1
2018 2 1
date for the above two customers
e customer subscribed for the first time,
know the Start_Date of customer
Insights
Group ID: 7878, 10090 were onboarded on the same day (1st Jan, 2016 and last transaction of both was also on same day (1s
This may be because both customer might have same parent company

Future Analysis Scope

Survey and Clustering Analysis Dashboard C


We can try taking a survey once customer decides to cancel subscription A Dashboard to Visualize the KPIs and the tren
Below Questions can be added to the survey questionnare: Also a functionality to perform deep dive an
Too Expensive additional tabs in the
Technical Issues
Switching to other product We can define below metrics to check the Ove
Too complicted / not adept 1 #Active Customers (e.g. who have atele
Shutting down company 2 Custommer Retention Rate
Missing features I need 3 Customer Churn Rate
We can do clustering analysis to understand what type of customers 4 MRR
based on their survey responses 5 ARPC
We can also add open ended questions in survey and do topic modeling 6 APPC
7 Existing Customer Revenue Growth Ra
Experimental Design and Adhoc Analysis 8 Customer Return Rate
How likely are the repurchased customer going to upgrade ? 9 NPS = %Promoter - %Detractor
How much affect does a promotion have on the acquistions 10 CLV =Average Monthy Customer Spen
What is the effect of promotional campaign on the acquistion? 11 ATPM = Average Transaction per Mont
What is the effect of promotional campaign on MRR? Churn Rate? 12 Revenue Churn Rate
13 #Customer Acquisition
14 Acquistion Revenue
15 Same Store Revenue
h was also on same day (1st Oct, 2017)

Dashboard Creation
sualize the KPIs and the trends can be created at Executive Level
ality to perform deep dive analysis can be provided by creating
additional tabs in the dashboard

ow metrics to check the Overall Business Health


stomers (e.g. who have ateleast 1 active plan)
r Retention Rate

Average Revenue Per Customer


Average Plans Per Customer
stomer Revenue Growth Rate

omoter - %Detractor
rage Monthy Customer Spent * Average Customer Lifespan
erage Transaction per Month

New customers onboarded


Revenue associated with new customer (e.g. age < 90 days)
Revenue associated with old customer (e.g. age > 90 days)

You might also like