Google SQL Question on Retention (Most Get It Wrong)
Автор: The Data-Driven PM
Загружено: 2026-03-18
Просмотров: 10
Описание:
Hello Guys,
In this video, we tackle an SQL interview problem, demonstrating how to use sql queries to identify users active in specific months. This sql tutorial for beginners is perfect for anyone looking to improve their sql basics knowledge and ace their next database interview with practical sql interview questions and answers.
-- 1. Create Table
CREATE TABLE User_Activity (
user_id INT,
activity_date DATE
);
-- 2. Insert Case Study Data
INSERT INTO User_Activity VALUES
(1, '2026-02-10'), -- User 1 active in Feb
(2, '2026-02-15'), -- User 2 active in Feb
(3, '2026-02-20'), -- User 3 active in Feb
(1, '2026-03-05'), -- User 1 Retained in March
(3, '2026-03-12'), -- User 3 Retained in March
(4, '2026-03-15'); -- User 4 New in March (Not a retained user)
-- Note: User 2 Churned (Active in Feb, but NOT in March).
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: