Finding Duplicate Rows Using ROW_NUMBER() | Essential SQL

Поделиться
HTML-код
  • Опубликовано: 1 авг 2024
  • Here is a really easy way, using a window function, to find duplicate rows within a result. By using the ROW_NUMBER function we'll identify one or more duplicates within a partition, or that is, the columns we are checking for duplicates.
  • НаукаНаука

Комментарии • 32

  • @youngreezey8253
    @youngreezey8253 2 года назад +1

    Really well explained and easy to understand. Keep making more of this - you absolutely earned my sub :)

  • @nadirafant6428
    @nadirafant6428 2 года назад +1

    This is the video I needed!

  • @Akkiteja1011
    @Akkiteja1011 2 года назад +1

    Out of all the videos I have searched on this topic..this video is best

    • @EssentialSQL
      @EssentialSQL  2 года назад

      Hi! Thanks for the kind remarks. I appreciate it!

  • @mubaraq8853
    @mubaraq8853 2 года назад

    Thank you so much for this, very well explained!

  • @jrbrey4113
    @jrbrey4113 3 года назад +1

    this was very helpful!

  • @balrajvirdee1087
    @balrajvirdee1087 Год назад

    Great explanation thanks so much, this has really helped 👍🏽

  • @brianmurphy6309
    @brianmurphy6309 Год назад

    subbed!!

  • @nicolposthumus4243
    @nicolposthumus4243 3 года назад

    Very Helpful , Thanks

    • @EssentialSQL
      @EssentialSQL  3 года назад +1

      Thanks! I'm glad you liked it!

  • @darrylw99
    @darrylw99 10 месяцев назад

    How can you delete the duplicates when the permanent table won't have a unique column like riw number?

  • @memberman
    @memberman 2 года назад +1

    That's for this helped out

    • @EssentialSQL
      @EssentialSQL  2 года назад +1

      Glad it helped - have a great day!

  • @RandyWatson80
    @RandyWatson80 2 года назад +1

    you made it click for me, thanks

    • @EssentialSQL
      @EssentialSQL  2 года назад

      Thats awesome! Let me know if there are other topics you want to hear about.

  • @SQLUniversity
    @SQLUniversity Год назад

    Great Video Essential SQL. Which editor are you writing your SQL in?

    • @EssentialSQL
      @EssentialSQL  Год назад

      I'm using Azure Data Studio. It's cross platform.

  • @Peterstevoli
    @Peterstevoli 3 года назад +1

    Great video

  • @samuelmaiia
    @samuelmaiia 2 года назад

    Hi there.
    How would you do if you want to find duplicate rows in a table with over 30 columns?
    Thank you 😊

    • @EssentialSQL
      @EssentialSQL  Год назад

      You can either add all 30 columns to your Partition By clause, or figure out what columns really matter and just include those.

  • @alexandremondaini
    @alexandremondaini 2 года назад

    what is this software that you are using to query databases ?

    • @bryannsi
      @bryannsi 2 года назад +1

      Azure Data Studio

    • @EssentialSQL
      @EssentialSQL  Год назад

      I'm using Azure Data Studio. It my goto SQL tool now. :)

  • @chinmayk2657
    @chinmayk2657 2 года назад

    How to update one record from duplicate (all value are same)

    • @EssentialSQL
      @EssentialSQL  2 года назад +1

      When you use row_number you can elects how to pick the duplicate. So you can update the “first row” or via some other means.
      That’s what makes window functions so flexible.
      I go over this in my course.

  • @payyavulagopichand9809
    @payyavulagopichand9809 3 года назад

    how to delete duplicate records using row_number in SQL