Тёмный

Tricky SQL Interview Question | Data Analyst| Data Engineer| Data Scientist| Min-Max Group Sequence 

Data Project Hub
Подписаться 2,1 тыс.
Просмотров 518
50% 1

In this video we will solve a tricky SQL interview question asked for multiple data roles.
Table DDL & DML :-
create table tab_sequence(
[group] varchar(20),sequence int)
insert into tab_sequence([group],sequence)
values('A',1),('A',2),('A',3),('A',5),('A',6),
('A',8),('A',9),('B',11),('C',1),('C',2),('C',3)
🔍 Looking for something specific? Check out my curated playlists.
✅Complex SQL Interview Questions
• Complex SQL Interview ...
✅SQL Interview Questions
• SQL Interview Bootcamp...
✅SQL Mastery Interview Prep
• SQL Concepts: Detailed...
✅Learn SQL Concepts
• SQL Fundamentals: Key ...
✅SQL Functions
• SQL Functions Explaine...
📩 Contact: For any inquiries or collaborations, please email me at dataprojecthub@gmail.com
Don't forget to hit the subscribe button and ring the notification bell to never miss an update! Become a valued member of our passionate community and be part of the journey with me!
Thanks for watching, and see you in the next video!" 🚀

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

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 3   
@bankimdas9517
@bankimdas9517 4 месяца назад
Very trick but easy question. Thanks for sharing🙏
@ketantayal8679
@ketantayal8679 4 месяца назад
TRICKY QUESTION 👍
@vijaygupta7059
@vijaygupta7059 3 месяца назад
My solution in MSSQL DB: with cte1 as ( Select * ,row_number()over(partition by [group] order by sequence) as rn ,sequence - row_number()over(partition by [group] order by sequence) as rn1 from tab_sequence ) Select [group],min(sequence) as min_seq, max(sequence) as ma_seq from cte1 group by [group], rn1 order by [group]
Далее
У КОТЕНКА ПРОБЛЕМА?#cat
00:18
Просмотров 745 тыс.
Women’s Celebrations + Men’s 😮‍💨
00:20
Просмотров 1,3 млн