Перейти к содержимому

DELOITTE HARD SQL Interview Question in Hindi | Find Start and End Dates for Consecutive rows

Aditya Bansal

0:00 / 0:00

DELOITTE HARD SQL Interview Question in Hindi | Find Start and End Dates for Consecutive rows

5 114 просмотров · 10 мес. назад
Aditya Bansal
3,22 тыс. подписчиков
5 114 просмотров · 10 мес. назад
🎯 SQL Interview Challenge – Can You Solve This? In this video, we take a real-world problem involving event logs and use SQL window functions (ROW_NUMBER) to group consecutive records by date. This is a popular interview question used in top tech and data roles. 🧩 Problem: You are given an Events table with event types and event dates. Your task is to find: • Start date of each consecutive event sequence • End date of each consecutive event sequence This video covers: ✔ ROW_NUMBER with ORDER BY and PARTITION BY ✔ How to detect gaps between dates ✔ Grouping consecutive records dynamically ✔ Practical business scenario for analytics 📌 Table Insert and Create Statements: CREATE TABLE events ( event VARCHAR(50), event_dt DATE ); INSERT INTO events (event, event_dt) VALUES ('fail', '2020-01-04'), ('success', '2020-01-01'), ('success', '2020-01-03'), ('success', '2020-01-06'), ('fail', '2020-01-05'), ('success', '2020-01-02'); 📍 Who should watch? • SQL learners and interview candidates • Data Analysts / Engineers • Anyone preparing for tech interviews 🔗Join SQL Junction Community 📢 Telegram: (https://t.me/sqljunction) 💼 LinkedIn: [ linkedin.com/in/adityabansal095 ] Instagram: [instagram.com/desiofficelife] 💡 Don’t Forget To 👍 Like the video 📝 Comment your approach 🔔 Subscribe for more SQL Challenges every week! #SQLInterview #SQLServer #SQLChallenge #DataEngineering #DataAnalyst #SQLTutorial #AdityaBansalSQL #SQLJunction #DataScienceInterview #SQLQuestion #TechInterview #AdvancedSQL #interviewprep