SQL Interview Question | Difference between Row Number, Rank and Dense Rank | Tie-breaking scenario

SQL Interview Question | Difference between Row Number, Rank and Dense Rank | Tie-breaking scenario

Learn at Knowstar

2 года назад

10,728 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@gangadharpandey3455
@gangadharpandey3455 - 04.10.2023 21:20

wonderful explanation

Ответить
@Faisal1504
@Faisal1504 - 19.05.2022 16:28

Can you add second parameter to row number and dense rank functions like you did to rank ?

Ответить
@Faisal1504
@Faisal1504 - 19.05.2022 16:26

Second parameter can be added to dense rank function also?

Ответить
@Faisal1504
@Faisal1504 - 19.05.2022 16:22

Thanks

Ответить
@Faisal1504
@Faisal1504 - 19.05.2022 16:22

Thanks.

Ответить
@harryhenry341
@harryhenry341 - 01.05.2022 05:09

🄿🅁🄾🄼🄾🅂🄼

Ответить
@joeanderson3423
@joeanderson3423 - 29.04.2022 07:37

MOST Excellent. Clear and concise.

Ответить
@vamshitha449
@vamshitha449 - 25.04.2022 18:10

Very useful but please maintain some clarity

Ответить
@gajalakshmisamayadurai
@gajalakshmisamayadurai - 12.03.2022 04:47

How to solve this problem

declare @Country as table (country varchar(20))

insert into @Country select 'INDIA'
insert into @Country select 'AUS'
insert into @Country select 'Srilanka'
insert into @Country select 'England'
insert into @Country select 'South Africa'

-- Input
select * from @Country

-- Required Output with single select statement
Team_A Team B
INDIA AUS
INDIA Srilanka
INDIA England
INDIA South Africa
AUS Srilanka
AUS England
AUS South Africa
Srilanka England
Srilanka South Africa
England South Africa

Ответить
@hv0032113
@hv0032113 - 09.03.2022 08:25

Very helpful. Thanks.

Ответить
@un_officialmcoc8218
@un_officialmcoc8218 - 09.03.2022 07:49

thank you

Ответить