Rank and Dense Rank in SQL Server

  Рет қаралды 242,049

kudvenkat

kudvenkat

Күн бұрын

Пікірлер: 80
@krzysztofs8535
@krzysztofs8535 7 жыл бұрын
Venkat rules! I'm the biggest fan of your tutorials. You are the best teacher in the world. God bless you for all your work and achievements. I learned a lot from your videos. Your explanations are fantastic and the way of your teaching is superb. Greatings from Poland !
@88spaces
@88spaces 5 жыл бұрын
I have said this before about you, but it bears repeating. You are the foremost expert on grouping data. I appreciate your videos and they have helped me a lot.
@chetanchaudhari7538
@chetanchaudhari7538 Жыл бұрын
Hi Venkat, I wanted to take a moment to express my heartfelt gratitude for your exceptional teaching of programming. Your dedication and expertise have had a tremendous impact on my learning journey, and I am incredibly grateful for your guidance. Your ability to break down complex programming concepts into understandable chunks truly impressed me. Through your clear explanations and engaging teaching style, you made learning programming enjoyable and accessible.
@dhamma1283
@dhamma1283 3 жыл бұрын
Everytime I watch venkat tutorials, I like the video first and then I start. 👍
@shradarai1068
@shradarai1068 Жыл бұрын
That voice is ASMR to my ears.😌
@poorvi1036
@poorvi1036 8 жыл бұрын
Thank you for all your tutorials..I love your explanations and your soothing voice.I wish I had your brain,you make it look so easy,lol.
@srujanareddy5185
@srujanareddy5185 5 жыл бұрын
Omg...you are an amazing teacher. I feel too bad about not finding your tutorials until now. THANK YOU!
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 5 жыл бұрын
Hello Srujana - Thank you. Glad you are finding the videos useful. Means a lot. I have included all the SQL Course videos, slides and text articles in sequence on the following page. Hope you will find it handy. www.pragimtech.com/courses/sql-server-tutorial-for-beginners/ If you have time, can you please leave your rating and valuable feedback on the reviews tab. It really helps us. Thank you. Good luck and all the very best with everything you are doing.
@rajreddy2561
@rajreddy2561 7 жыл бұрын
Great explanation. One of the very few tutorials I have seen which is very clear and still very precise. Super job! Thanks Venkat
@sumaiyamohiyuddin8173
@sumaiyamohiyuddin8173 4 жыл бұрын
Thanks a lot for ur explanation.The highlight is the clarity and simplicity of explanation
@gurjeet333
@gurjeet333 2 жыл бұрын
Although this is an old video the explanation is a real gem. Timeless knowledge
@liverickoben9922
@liverickoben9922 4 жыл бұрын
thanks for all your tutorials and clear explanations
@dbin805
@dbin805 8 жыл бұрын
thanks. this is the best explanation that I have seen for this.
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 8 жыл бұрын
+Dean Brandenburg Thanks a bunch for taking your valuable time to give feedback. Means a lot. Glad you found the videos useful. Dot Net & SQL Server videos for aspiring software developers kzbin.infoplaylists?view=1&sort=dd If you need videos for offline viewing, you can order them using the link below www.pragimtech.com/Order.aspx Code Samples, Text Version of the videos & PPTS on my blog csharp-video-tutorials.blogspot.com Tips to effectively use our channel kzbin.info/www/bejne/r2ibYYCtnb5qZtU Want to receive email alerts, when new videos are uploaded, please subscribe to our channel using the link below kzbin.info Please click the THUMBS UP button below the video, if you think you liked them Thank you for sharing these links with your friends Best Venkat
@awengirr
@awengirr 8 жыл бұрын
This was the best explanation ever. Thank you for that!
@deepakpangali1315
@deepakpangali1315 2 жыл бұрын
Super awesome, your explanations are truly good. I really learnt a lot from it....Thank you so much!!
@mariorivera6292
@mariorivera6292 2 жыл бұрын
This helped me understand Rank better. Thank you.
@pavithravvenu5817
@pavithravvenu5817 3 жыл бұрын
Great Videos and clear Explanation.Thanks a lot!!! it is very useful
@absneo247
@absneo247 7 жыл бұрын
Thanks very much for these videos.They are simple to understand and really helpful in learning query writing.
@soniasadeque4248
@soniasadeque4248 7 жыл бұрын
hats off to you.. you are a great teacher..
@vishnuvardhanreddy5986
@vishnuvardhanreddy5986 2 жыл бұрын
Nice Explanation, Thankyou so much.
@fikirtezewdie5633
@fikirtezewdie5633 2 жыл бұрын
Hi Venkat, you are the best!!
@lilarasekh3818
@lilarasekh3818 8 жыл бұрын
you guys are great! I learned a lot from your videos
@mscreations183
@mscreations183 5 жыл бұрын
Awesome teaching...👌👌👌
@TheHimaBindu
@TheHimaBindu 9 жыл бұрын
Very informative
@chandrakumarreddyvennapusa7806
@chandrakumarreddyvennapusa7806 4 жыл бұрын
Fantastic
@muhammadrehbarsheikh8498
@muhammadrehbarsheikh8498 9 жыл бұрын
Thanks venkat sir!!
@swetapanigrahi8001
@swetapanigrahi8001 4 жыл бұрын
Thank you.. Very nice tutorial
@shariqahmed9416
@shariqahmed9416 5 жыл бұрын
Nice explanation skills
@optimistic_guy313
@optimistic_guy313 3 жыл бұрын
Thank you so much
@nagatmohamed8246
@nagatmohamed8246 9 жыл бұрын
Thanks a lot, sir.
@yogeshghule5260
@yogeshghule5260 6 жыл бұрын
you are the great sir
@keyvansadeghi5743
@keyvansadeghi5743 4 жыл бұрын
Thank u bro that was helpful
@102RC
@102RC 7 жыл бұрын
Thank You Professor.
@anish_k
@anish_k 2 жыл бұрын
Thanka a lot sir
@TheSwatirock
@TheSwatirock 7 жыл бұрын
Thanks Professor..tutorial is quite helpful.
@ting-kangpai1580
@ting-kangpai1580 4 жыл бұрын
Thank you!
@korrapativinodkumar4760
@korrapativinodkumar4760 6 жыл бұрын
EXCELLENT
@annwayde129
@annwayde129 4 жыл бұрын
Thanks a lot
@samirkumar6180
@samirkumar6180 3 жыл бұрын
Hello sir, pls make video on table partitioning and their concept...this is something important which is not made yet
@raqibul1000
@raqibul1000 9 жыл бұрын
Thanks a trillion
@jorgegonzaloalfaro5378
@jorgegonzaloalfaro5378 4 жыл бұрын
Bro thank you!!!!
@praburajiiv
@praburajiiv 2 жыл бұрын
clean
@bhavyashreesarvamangala6775
@bhavyashreesarvamangala6775 3 жыл бұрын
Super super super duper
@drallisimo34
@drallisimo34 8 жыл бұрын
coooooooool tutorial!!!
@prashantparmar1397
@prashantparmar1397 9 жыл бұрын
Please post video on how to populate calender
@quanhoang2139
@quanhoang2139 8 жыл бұрын
thanks you
@wwewwf324
@wwewwf324 5 жыл бұрын
what is the use case of Rank function.Is there any scenario where we will use Rank?
@surabhichouhan3758
@surabhichouhan3758 4 жыл бұрын
Hi Can we use rank, dense_rank or row_number functions over varchar columns?
@analytikmindz5390
@analytikmindz5390 4 жыл бұрын
Yes
@aadityasharma9024
@aadityasharma9024 3 жыл бұрын
When you use Top 1 then it should be returning 1st row then what's the use of where clause with it?
@anirbandas2062
@anirbandas2062 6 жыл бұрын
I have a problem, where i am required to determine a Rank on a table on the basis of a derived column. Say first column desired is Name of Port, 2nd column is the sum of profit made on that port. The third column should be the rank based on the highest profit the port has. How can i create an sql query of rank on a derived column like the sum of total profit for each port? Hopefully you can give a suitable example.
@JohnDoe-dy4kf
@JohnDoe-dy4kf 7 жыл бұрын
What are the advantages using of Rank() compared to GROUP BY or DISTINCT?
@ManishKumar-qx1kh
@ManishKumar-qx1kh 3 жыл бұрын
u cant group by for each record brother there will be only one record for each group. Rank with Over clause will give you each record separately.
@praveennagarajan1407
@praveennagarajan1407 4 жыл бұрын
Hi, How can I select top 3 of DENSE_RANK() ?
@richardfrimpong3962
@richardfrimpong3962 3 жыл бұрын
Why is it desc because I see the values in Ascending order so can someone give me why?
@jsj14
@jsj14 3 жыл бұрын
What if there are 100Million rows in this table? Won't the order by take a lot of time while ranking
@supercatsmari
@supercatsmari 5 жыл бұрын
Thank you Venkat. I need some more information on this with join condition. Example i have employee table which has eno,ename,esal,edeptno columns, and another table (dept) which has dno,dname. Now i want to get the second max salary of "dname='Maths'". Please help me on this.
@MaheshBabu-vq7qk
@MaheshBabu-vq7qk 4 жыл бұрын
With EmployeeCTE as ( select emp.Name as [Employee Name], Gender, Salary, dept.Name as [Department Name], Dense_Rank() over (partition by dept.Name order by Salary desc) DenseRank from tblEmployees emp inner join tblDepartment dept on emp.DepartmentId = dept.DepartmentId ) Select Salary from EmployeeCTE where DenseRank = 2 and [Department Name]='Maths' With the above inner query in EmployeeCTE, we will get all the employee details like Employee Name, Gender, Salary, Department Name and Dense Rank partitioned by each department. Finally, we are getting second highest paid salary for the department "Maths" from the EmployeeCTE.
@adithyagarigipati4205
@adithyagarigipati4205 6 жыл бұрын
Can we start rank from a number we need ? Like 1000 ?
@rameshr5809
@rameshr5809 6 жыл бұрын
Hello Venkat, you are my Dhronacharya,Thanks lot. Why we need to use top 1 in Result when we are filtering with Dense_Rank?
@MaheshBabu-vq7qk
@MaheshBabu-vq7qk 4 жыл бұрын
If we have 3 employees with second highest paid salary, we will get Salary three times in the result CTE. In order to avoid such kind of duplicate salaries, we can use either "top 1" or "distinct" keyword in the final select query.
@Gamezone-kq5sx
@Gamezone-kq5sx 6 жыл бұрын
want to find tob 5 highest product price in each category.In this case if there are one or more products with same price and if I use rank() then I get more than two record with rank 1 but I can't get rank with value 2 because there is tie.But in this case if I use dense_rank() then I get more than one records with dense_rank() of value 1 2 3 4 5.Please help
@aaron2cool4u
@aaron2cool4u 2 жыл бұрын
Try select distinct rather than regular select with rank()
@AmitKumar-fr7gb
@AmitKumar-fr7gb 2 жыл бұрын
@@aaron2cool4u Thanks.. I had the same question.
@shivarjunroy1394
@shivarjunroy1394 5 жыл бұрын
Rank will omit whereas dense rank will not omit
@gurungoracle
@gurungoracle 8 жыл бұрын
how can I rank whole record only 1 through 10? not top n
@ManishKumar-qx1kh
@ManishKumar-qx1kh 3 жыл бұрын
use a CTE to rank them first and then select from the CTE where rank between to
@maryam4071
@maryam4071 5 жыл бұрын
What’s tie? I can’t understand it.
@nys8260
@nys8260 3 жыл бұрын
notice in salary column there is two values 8000 this is called tie (when there is more one value is similar)
@krishnachaitanya9367
@krishnachaitanya9367 9 жыл бұрын
Hi Venkat, Am very happy to see your videos. i have a small doubt in this video with the below query. with Result as ( select salary, RANK() over (order by salary desc) as salaryrank from [dbo].[dense_employees] ) SELECT TOP 1 salary from Result where salaryrank=1 and my table structure is: CREATE TABLE [dbo].[dense_employees]( [id] [int] NULL, [name] [varchar](30) NULL, [gender] [varchar](10) NULL, [salary] [int] NULL ) ON [PRIMARY] when am executing the above query in 2012 sql server its not giving output.its showing that "incorrect syntax near result". Please guide me how to execute this in 2012 sqlserver. it will be great if can you can help on this. when am browsing the internet some sites showing "with result sets" other than "with result as" Please guide me on this . Thnaks, Krishna
@shivarjunroy1394
@shivarjunroy1394 5 жыл бұрын
Ritesh Deshmukh
@shivarjunroy1394
@shivarjunroy1394 5 жыл бұрын
Madhuri Dixit
@shivarjunroy1394
@shivarjunroy1394 5 жыл бұрын
Mechanical
@shivarjunroy1394
@shivarjunroy1394 5 жыл бұрын
Rank =1
@shivarjunroy1394
@shivarjunroy1394 5 жыл бұрын
Anil Kapoor
@saahilsud8933
@saahilsud8933 4 жыл бұрын
What is with this fake accent man? It makes it so hard to focus on the lesson without getting irritated out of your mind. Who are you? Priyanka Chopra?
@shaikhzoyeb
@shaikhzoyeb 3 жыл бұрын
declare @tbl table ( id int ) insert into @tbl values (1),(1),(3),(4),(5) select rank() over (order by id) as Rank_, DENSE_RANK()over (order by id) as Dense_rank_ from @tbl
@alinemath5030
@alinemath5030 9 ай бұрын
Thanks!
Difference between rank dense rank and row number in SQL
4:43
kudvenkat
Рет қаралды 118 М.
RANK and DENCE_RANK in SQL | Oracle SQL Tutorial Videos | Mr.Vijay Kumar
16:58
Naresh i Technologies
Рет қаралды 55 М.
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 188 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 14 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 59 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 50 МЛН
Dynamic SQL in SQL Server
12:12
kudvenkat
Рет қаралды 135 М.
Window functions in SQL Server
11:00
kudvenkat
Рет қаралды 222 М.
Grouping function in SQL Server
12:49
kudvenkat
Рет қаралды 81 М.
Row Number function in SQL Server
7:24
kudvenkat
Рет қаралды 242 М.
Clustered and nonclustered indexes in sql server   Part 36
16:48
kudvenkat
Рет қаралды 963 М.
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 188 МЛН