Тёмный

SQL Problem Solving: Finding Longest Gym Streak | Step-by-Step Tutorial 

Rahul Upadhya
Подписаться 648
Просмотров 409
50% 1

Dive into the world of SQL problem-solving with our latest tutorial! In this session, we tackle the challenge of deciphering gym attendance logs, extracting entries for when users attended or skipped the gym. Join us on a step-by-step journey as we unravel the secret to finding the longest streak-identifying the maximum consecutive days a user attended the gym.
📋 Problem Description:
Explore the "gym_logs" table, showcasing user entries on gym attendance for specific dates. By leveraging SQL prowess, we navigate through the entries to pinpoint the longest streak, providing insights into a user's dedicated fitness journey.
Table creation & insertion script:
CREATE TABLE gym_logs(
entry_date DATE,
status CHAR(1)
);
INSERT INTO gym_logs VALUES('2023-01-01','N'),('2023-01-02','Y'),('2023-01-03','Y'),
('2023-01-04','N'),('2023-01-05','N'),('2023-01-06','Y'),('2023-01-07','Y'),
('2023-01-08','Y'),('2023-01-09','N');
👉 Like, share, and subscribe for more SQL tutorials and problem-solving sessions! Explore additional challenges in our SQL playlist and become a SQL pro.
#sql #interview #problemsolving #sqlprogramming #sqlqueries

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

 

20 авг 2023

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 3   
@vijaypalmanit
Super, saw many videos but yours is amazing
@soumyaranjanrout2843
Hello Sir, I got the logic behind grouping the consecutive days. But I am trying to do it in another approach but after so many tries I didn't able to find any such logic apart from yours in whicu we can group the consecutive days. If possible could you please tell me other approach apart from the one which you discussed in the video?
Далее
Я КУПИЛ САМЫЙ МОЩНЫЙ МОТОЦИКЛ!
59:15
РУБИН - ЗЕНИТ: ВСЕ ГОЛЫ
01:03
Просмотров 204 тыс.
Expert Level SQL Tutorial
23:27
Просмотров 153 тыс.
How To Model Winning And Losing Streaks In Excel
5:55
Просмотров 2,4 тыс.