Over clause in SQL Server

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ม.ค. 2025

ความคิดเห็น • 113

  • @alekseyr7394
    @alekseyr7394 9 ปีที่แล้ว +37

    Amazing video, thanks a lot!

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  9 ปีที่แล้ว +6

      +Алексей Руденко Thank you very much for taking time to give feedback. This means a lot. I am very glad you found the videos useful.
      I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you
      th-cam.com/users/kudvenkatplaylists?view=1&sort=dd
      If you need all the videos and slides for offline viewing please visit
      www.pragimtech.com/kudvenkat_dvd.aspx
      Slides and Text Version of the videos can be found on my blog
      csharp-video-tutorials.blogspot.com
      Tips to effectively use my youtube channel.
      th-cam.com/video/y780MwhY70s/w-d-xo.html
      If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel.
      th-cam.com/users/kudvenkat
      If you like these videos, please click on the THUMBS UP button below the video.
      May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them.
      Good Luck
      Venkat

  • @nasarazam
    @nasarazam 9 ปีที่แล้ว +32

    Among the best Teachers I have found on TH-cam. He has that skills of shredding complex things and explaining it in a simple manner. Kudos !

    • @maheshmenta6078
      @maheshmenta6078 หลายเดือนก่อน

      there real talent comes out

  • @88spaces
    @88spaces 4 ปีที่แล้ว +2

    What I love about your videos is that you stick to one topic. You don't add material that is not directly related. It makes my life easier. Thank you.

  • @krzysztofs8535
    @krzysztofs8535 8 ปีที่แล้ว +1

    OVER Partintion by RULES. And Venkat Rules ! Tahnk U for educating community. I watched all your videos and i'm impressed. Thank U . Yoy are the best teacher in the world and youtube !

  • @raqibul1000
    @raqibul1000 9 ปีที่แล้ว +3

    The best Teachers and also the best Programmer who have too much clear concept I have found on TH-cam

  • @anthonyfranz8317
    @anthonyfranz8317 4 ปีที่แล้ว

    This was an excellent example for the OVER and PARTITION BY clauses. I learned a lot by watching this, again, excellent!!!

  • @Myrslokstok
    @Myrslokstok 2 ปีที่แล้ว

    This actually the way I would like to teach. You show how complicated a solution is and you show and explain a simpler solution, thanks kudos excilent!

  • @estheticsguru
    @estheticsguru ปีที่แล้ว

    This was an amazing and easy to understand explanation of over and partition by in relation to aggregate functions!!! Thank you!!!

  • @umut2243
    @umut2243 4 ปีที่แล้ว +1

    I really understood. Before, I always stucked with this problem: whenever I want to retrieve columns like names, salary etc. as grouping with another column that error comes up. However, if we use subquery we'll able to fix that. But subquery may be fuzzy so that we use over. It's brillant, I'm really happy to understand this.

  • @VersinKettorix
    @VersinKettorix 8 ปีที่แล้ว +1

    Thank you for taking the time to post this video. Your explanation of this function was the best I have seen when trying to figure out the use of the "Partition.. Over()" function. Very helpful.

  • @kimbowayasin6940
    @kimbowayasin6940 3 ปีที่แล้ว +1

    You have really simplified my work in SQL queries, thank you sir

  • @mudasir989
    @mudasir989 5 ปีที่แล้ว

    You are ray of light for lot of people Venkat. … God bless you !!!!!

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  5 ปีที่แล้ว

      Hello Mudasir - Thank you very much Greatly honoured. Means a lot. I have included all the SQL tutorial 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.

  • @allangao4783
    @allangao4783 4 ปีที่แล้ว

    You are a great teacher. Very good examples, very helpful tutorials, and your English is really good so it is easy to follow along to your instruction!

  • @onemanenclave
    @onemanenclave 5 ปีที่แล้ว +3

    This is the only correct way of explaining OVER: by relating it with GROUP BY.

  • @aashishmalhotra
    @aashishmalhotra 2 ปีที่แล้ว

    Kudos very well explained sir good example taken. Please bring a SQL interview series. Nowadays it well appreciated by audience.

  • @libertymudzingwa1206
    @libertymudzingwa1206 4 ปีที่แล้ว +1

    This is amazing!!! You are very good at explaining complex concepts and make them easy to understand

  • @MatthewPimenta
    @MatthewPimenta 3 ปีที่แล้ว

    Thank you for this video! Clean, clear, and I really appreciate the comparisons to other methods.

  • @prasadrsby5274
    @prasadrsby5274 9 ปีที่แล้ว +1

    Dear sir it s very nice and i am watching ur videos up to 68 part i learning every day new concepts

  • @edwinmchaffie5091
    @edwinmchaffie5091 5 ปีที่แล้ว +1

    Venkat, You should have a lot more subscribers.. Your vids are tops!!

  • @mickeysaini
    @mickeysaini 3 ปีที่แล้ว

    Very Well explained
    Alternate Solution using CTE
    select Gender,count(Gender) GenderTotal,avg(Salary) AvgSalary, Min(Salary) as MIN , Max(Salary) as MaxSalary from
    (select Salary,Gender,Count(Gender) over (partition by Gender) as RN from Employees )
    result
    group by Gender

  • @brindhaganesan3580
    @brindhaganesan3580 6 ปีที่แล้ว +1

    This is an excellent channel. I am so glad I found it!

  • @carmenliu3765
    @carmenliu3765 8 ปีที่แล้ว +1

    Thanks for the video and making it easy to understand!

  • @saurabhdsawant
    @saurabhdsawant 5 ปีที่แล้ว

    Thanks @kudvenkat for such clean explanation! I was confused about use of over for long time and I struck the gold here

  • @stevenaleman7454
    @stevenaleman7454 2 ปีที่แล้ว

    thank you for sharing this knowledge...it really helped me today. ✌

  • @slavaseagull7349
    @slavaseagull7349 8 ปีที่แล้ว

    Thank you! It is a very helpfull video tutorial. Now the Over clause is realy clear for me.

  • @ni12907
    @ni12907 4 ปีที่แล้ว

    Very good explanation, superrrrr !!! thanks 💕

  • @davidvo30
    @davidvo30 7 ปีที่แล้ว

    Excellent tutorial video with practical samples, thank you.

  • @bajanguy2664
    @bajanguy2664 4 ปีที่แล้ว

    Very well explained! New subscriber inserted to the table.

  • @raptorslam84
    @raptorslam84 4 ปีที่แล้ว

    Genus on the way you explained this !! Thank you !!

  • @leonidasparigoris1389
    @leonidasparigoris1389 3 ปีที่แล้ว

    You're a great teacher. Thanks

  • @QuickZ_
    @QuickZ_ 4 ปีที่แล้ว

    Excellent teaching as always!

  • @MrCardeso
    @MrCardeso 9 ปีที่แล้ว +1

    Very nice! Another useful tool! Thanks.

  • @Frickenchies
    @Frickenchies 7 ปีที่แล้ว +2

    Very well explained, thank you!

  • @TheThodi
    @TheThodi 8 ปีที่แล้ว +1

    easily understandable, great job!

  • @idhamhafidz
    @idhamhafidz 7 ปีที่แล้ว

    Thank you so much. You are an awesome teacher

  • @petetalbert
    @petetalbert 7 ปีที่แล้ว +1

    Such clear explanation, thank you!

  • @sudhanshuranjan632
    @sudhanshuranjan632 2 ปีที่แล้ว

    To the point this is good stuff👌👍

  • @Freeman1125
    @Freeman1125 6 ปีที่แล้ว

    Excellent video,clear logic ! thanks a million man

  • @brawnie3969
    @brawnie3969 หลายเดือนก่อน

    Thanks a lot for this tutorial, I finally could understand it :D

  • @303TheAlex
    @303TheAlex 8 ปีที่แล้ว

    Thank you for these tutorials, they are really great.

  • @juanpablo-kw6th
    @juanpablo-kw6th 8 ปีที่แล้ว

    this mean a lot for me thanks for teaching the world

  • @DaveClarkFive
    @DaveClarkFive 6 ปีที่แล้ว

    Great explanation and examples.

  • @ateeqhalikhan4012
    @ateeqhalikhan4012 5 หลายเดือนก่อน

    Superb explanation thanks alot

  • @RaviShankar-jm1qw
    @RaviShankar-jm1qw 8 ปีที่แล้ว

    Awesome video. So nicely explained!!!!

  • @srinivasreddypachika8716
    @srinivasreddypachika8716 2 ปีที่แล้ว

    Awesome Explanation!

  • @ALLCAPS
    @ALLCAPS 3 ปีที่แล้ว

    what a powerful tool! -over.

  • @ladhkay
    @ladhkay 6 ปีที่แล้ว +1

    Nicely explained!

  • @ricardovalle8360
    @ricardovalle8360 6 ปีที่แล้ว

    Great Video, pretty clear and didactic.

  • @UnstoppableBird
    @UnstoppableBird 5 ปีที่แล้ว

    This is very clear, thank you so much!

  • @subtlehustle6300
    @subtlehustle6300 2 ปีที่แล้ว

    Well explained 👍

  • @shailjamishra9423
    @shailjamishra9423 2 ปีที่แล้ว

    Thank you very very much!!!🙏🙏

  • @xuanquangnguyen2291
    @xuanquangnguyen2291 4 ปีที่แล้ว

    Thank you, the video is so useful!!!

  • @choudharymustansar3749
    @choudharymustansar3749 5 ปีที่แล้ว

    Easy and comprehensive
    Thanks

  • @swathibandarupalli803
    @swathibandarupalli803 2 ปีที่แล้ว +1

    Hello Venkat,
    In this example, in over clause, we are not specifying rows between clause. How its summing up all the rows values. Ideally it should take unbounded preceeding and current row as default.
    Can you please explain

    • @ritiktripathi8947
      @ritiktripathi8947 ปีที่แล้ว

      The default window frame without the ORDER BY is the whole partition. But when you use the ORDER BY, the default window frame is RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.

  • @asitkumarmohanty2579
    @asitkumarmohanty2579 8 ปีที่แล้ว

    superbly done. Kudos.. :)

  • @marshalljackson1385
    @marshalljackson1385 6 ปีที่แล้ว

    Well explained video. Thank you.

  • @YenNguyen-nf9uv
    @YenNguyen-nf9uv 3 ปีที่แล้ว

    Amazing tutorial. Thank you

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  3 ปีที่แล้ว

      Thank you Yen. Means a lot. Your review and feedback really helps. Hope you have a few minutes to write a review. Thank you for your time.
      g.page/r/CdKOVS3cTnYnEAg/review

  • @mahipalkamanchi
    @mahipalkamanchi 9 ปีที่แล้ว +1

    AWESOME ....!
    THANK U SIR...!

  • @AliHassanLearnMVC
    @AliHassanLearnMVC 9 ปีที่แล้ว +1

    very nice...thank u so much...

  • @funkychimp
    @funkychimp 6 ปีที่แล้ว +2

    Hi Venkat. Thank you for your tutorials. Can I ask. I thought the OVER clause had to be used with the ORDER BY clause. I'm just wondering here why the default 'RANGE BY UNBOUNDED PRECEEDING AND UNBOUNDED CURRENT ROW' does not apply here. Is it because you have used the PARTITION BY clause without the ORDER BY clause? Thanks funkychimp

    • @shubamsalaria971
      @shubamsalaria971 ปีที่แล้ว

      same question....does anyone has it's answer

  • @ReinaldoHernandezOchoa
    @ReinaldoHernandezOchoa 4 ปีที่แล้ว

    great video, thanks!

  • @izulien
    @izulien 3 ปีที่แล้ว

    Super neat concept! Is there a large performance difference between sub query vs over method?

  • @amanansari5567
    @amanansari5567 6 ปีที่แล้ว

    Thank you so much it was great help

  • @aliazad1118
    @aliazad1118 5 ปีที่แล้ว

    As usual perfect

  • @tannubajpai4782
    @tannubajpai4782 4 ปีที่แล้ว

    thnx u for ur services

  • @vikasmatrupally
    @vikasmatrupally 8 ปีที่แล้ว

    Thanks for the amazing n interesting videos. Helps a lot in our daily tasks.
    I am not sure the discussion forum is active. Could you please explain how to extract only the Max. Salaries for Male and Female along with other column fields for that record. Thanks !

  • @shrikanthsingh8243
    @shrikanthsingh8243 4 ปีที่แล้ว

    simply awesome

  • @santhoshb4545
    @santhoshb4545 3 ปีที่แล้ว

    At 6:22 in over clause used table, how do you get Name column Tom Ron Ben Todd Mark John in this sorting. Can someone xplain please, Thanks in advance

  • @timhxf1
    @timhxf1 8 ปีที่แล้ว +1

    why this is no ROWS clause in OVER() but the AVG() calculates for all rows in the partition?

  • @luizfabrette7450
    @luizfabrette7450 7 ปีที่แล้ว

    Well explained! Thanks

  • @עדיפרי-כ2ז
    @עדיפרי-כ2ז 8 ปีที่แล้ว

    Thanks you! very useful!

  • @spyrex3988
    @spyrex3988 2 ปีที่แล้ว

    this is so amazing stuff

  • @AjayChorat
    @AjayChorat 8 ปีที่แล้ว

    Thank you Venkat.. :)

  • @calvinharris4771
    @calvinharris4771 6 หลายเดือนก่อน

    Thank you 💌

  • @yurifontoura2189
    @yurifontoura2189 8 ปีที่แล้ว

    Indian, Always amazing! What would about us, without them?!

    • @jmjohnson42342
      @jmjohnson42342 8 ปีที่แล้ว

      +Yuri Fontoura What would about us, indeed.

    • @malharjajoo7393
      @malharjajoo7393 8 ปีที่แล้ว

      +Yuri Fontoura _ at least he is explaining difficult concepts man pardon his english

    • @yurifontoura2189
      @yurifontoura2189 8 ปีที่แล้ว +1

      +malhar jajoo I'm not criticizing him, in any way. Quite opposite of that. I just noticed the Indians are in everywhere seeding great materials. As SQLAuthority and JavaBrains channel have done as well.

  • @muhammadrehbarsheikh8498
    @muhammadrehbarsheikh8498 9 ปีที่แล้ว +1

    Thank you sir!!

  • @heathermari83
    @heathermari83 6 ปีที่แล้ว

    Thank you very much!!!

  • @TheEverydayAnalyst
    @TheEverydayAnalyst 2 ปีที่แล้ว

    We are partitioning 4 times in this example. Which query would be an optimal one in terms of performance?

  • @anweshgandham6776
    @anweshgandham6776 4 ปีที่แล้ว

    Does over function don't take default range as unbounded preceding and current row ??

  • @jayjayf9699
    @jayjayf9699 7 ปีที่แล้ว

    How come the avg in the over clause is not generating running average, I am confused what generates a running aggregate or just one value per partition by

  • @dosovi4548bustayes
    @dosovi4548bustayes 9 ปีที่แล้ว +1

    thank you merlin :-D

  • @manishekhar
    @manishekhar 2 หลายเดือนก่อน

    How come the query with aggregate functions created results as if rows between unbounded preceding and unbounded following is specified?

  • @bhaskardot
    @bhaskardot 2 ปีที่แล้ว

    thankyou very much

  • @temprmj1
    @temprmj1 6 ปีที่แล้ว

    Forgive my ignorance but wouldn't the query in the JOIN clause be a Derived table and not a sub query?

  • @ashishrao5635
    @ashishrao5635 9 ปีที่แล้ว +1

    Hi, Could you please also explain how to us Red Gate s/w for transferring data from one server to another

  • @RyanHeaney42
    @RyanHeaney42 7 ปีที่แล้ว

    Thanks! This helped!

  • @davidgreenfeld9691
    @davidgreenfeld9691 7 ปีที่แล้ว +1

    Great!

  • @SanjaySony303
    @SanjaySony303 9 ปีที่แล้ว +1

    hi sir .good afternoon
    thank you for providing video tutorial of .net
    sir would you teach, about data View and its uses and properties
    And DataTable

  • @cd1168
    @cd1168 6 ปีที่แล้ว

    excellent

  • @shubamsalaria971
    @shubamsalaria971 ปีที่แล้ว

    why didn't you use "unbounded preceding and unbounded following" here as u used in other video?.....could u please explain it

  • @ivankevamo
    @ivankevamo 8 ปีที่แล้ว

    Thanks mate!

  • @bahadirezici
    @bahadirezici 6 ปีที่แล้ว

    Yu da best!!!

  • @johncross116
    @johncross116 8 ปีที่แล้ว

    THANK YOU!

  • @richardlew3667
    @richardlew3667 3 ปีที่แล้ว

    On page 6 of the slide, how come Gender is in the subquery when it doesn't have aggregations?

  • @kamalpatwa123
    @kamalpatwa123 8 ปีที่แล้ว

    Thank You

  • @f1r3shoot
    @f1r3shoot 8 ปีที่แล้ว

    My respect

  • @javidhesenov7611
    @javidhesenov7611 2 ปีที่แล้ว

    thanks

  • @excaliber4ps
    @excaliber4ps 4 ปีที่แล้ว

    👍

  • @kevinberg7212
    @kevinberg7212 2 ปีที่แล้ว

    The number of views for videos such as these makes me worry for our future. This video should have 2M views by now.... oh wait, let's go watch baby shark one more time

  • @fathallahilyes529
    @fathallahilyes529 5 ปีที่แล้ว

    WHAT DO OVER(*) ?