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

  Рет қаралды 10,916

Learn at Knowstar

Learn at Knowstar

Күн бұрын

Пікірлер: 23
@briandennehy6380
@briandennehy6380 2 жыл бұрын
Best SQL channel on youtube for intermediate to advanced querying 👍
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you so much!
@joeanderson3423
@joeanderson3423 2 жыл бұрын
MOST Excellent. Clear and concise.
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you
@gangadharpandey3455
@gangadharpandey3455 Жыл бұрын
wonderful explanation
@LearnatKnowstar
@LearnatKnowstar Жыл бұрын
Thank you
@hv0032113
@hv0032113 2 жыл бұрын
Very helpful. Thanks.
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you
@un_officialmcoc8218
@un_officialmcoc8218 2 жыл бұрын
thank you
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you
@Faisal1504
@Faisal1504 2 жыл бұрын
Thanks
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you
@Faisal1504
@Faisal1504 2 жыл бұрын
Second parameter can be added to dense rank function also?
@Faisal1504
@Faisal1504 2 жыл бұрын
Can you add second parameter to row number and dense rank functions like you did to rank ?
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Yes, you can order all functions by the columns that are needed to define a unique record.
@vamshitha449
@vamshitha449 2 жыл бұрын
Very useful but please maintain some clarity
@gajalakshmisamayadurai
@gajalakshmisamayadurai 2 жыл бұрын
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
@pradeepba1439
@pradeepba1439 2 жыл бұрын
The output is of two tables or one table
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
You can simply use Join between two instances of the same table ex - select * from country a join country b On a.team < b.team
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you for posting this question. It is a good scenario and we will post a video tutorial as well in coming weeks for this scenario.
@saisarandarbha3031
@saisarandarbha3031 2 жыл бұрын
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'; with country as ( select *, row_number() over (order by (select 1)) as r from @country) select a.country,b.country from country a join country b on a.countryb.country where a.r
@Faisal1504
@Faisal1504 2 жыл бұрын
Thanks.
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 11 МЛН
RANK, DENSE_RANK, ROW_NUMBER SQL Analytical Functions Simplified
9:42
Difference between rank dense rank and row number in SQL
4:43
kudvenkat
Рет қаралды 118 М.
Rank and Dense Rank in SQL Server
10:08
kudvenkat
Рет қаралды 241 М.
Walmart SQL Interview Question | SQL Window Functions | Advanced
11:31
The 25 SQL Questions You MUST Know for Data Analyst Interviews
32:47
KSR Datavizon
Рет қаралды 246 М.
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59