Тёмный

Customer Retention and Churn Analysis | Part 1 | SQL Intermediate Question 5 

Code-Con
Подписаться 1,4 тыс.
Просмотров 1,1 тыс.
50% 1

Customer retention refers to the ability of a company or product to retain its customers over some specified period. High customer retention means customers of the product or business tend to return to, continue to buy or in some other way not defect to another product or business, or to non-use entirely.
Company programs to retain customers: Zomato Pro , Cashbacks, Reward Programs etc.
Once these programs in place we need to build metrics to check if programs are working or not. That is where we will write SQL to drive customer retention count.
Question :- COUNT THE NUMBER OF CUSTOMER RETAINED
DDL Script :-
drop table transactions
create table transactions(
order_id int,
cust_id int,
order_date date,
amount int
);
delete from transactions;
insert into transactions values
(1,1,'2020-01-15',150)
,(2,1,'2020-02-10',150)
,(3,2,'2020-01-16',150)
,(4,2,'2020-02-25',150)
,(5,3,'2020-01-10',150)
,(6,3,'2020-02-20',150)
,(7,4,'2020-01-20',150)
,(8,5,'2020-02-20',150);
For more Questions follow this playlist :-
• SQL Intermediate Quest...
#sql #sqldeveloper #sqlserver #dataanalytics #interviewquestions

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее
Ко мне подкатил бармен
00:58
Просмотров 92 тыс.
UUID vs INT: What’s Better For Your Primary Key?
9:40
#Tableau - Calculate Customer Churn Rate
6:58
Просмотров 16 тыс.
Learn GROUP BY vs PARTITION BY in SQL
14:03
Просмотров 37 тыс.
Ко мне подкатил бармен
00:58
Просмотров 92 тыс.