WINDOW FUNCTIONS | Advanced SQL

Поділитися
Вставка
  • Опубліковано 31 гру 2024

КОМЕНТАРІ • 94

  • @mo-chen
    @mo-chen  Рік тому +3

    TRY LATITUDE FOR FREE 👉 bit.ly/3o9iGlX

  • @nhatminhtang1645
    @nhatminhtang1645 Рік тому +5

    I've always been waiting this video since the previous about SQL released. Really appreciate your help !!!

    • @mo-chen
      @mo-chen  Рік тому

      Thanks so much for watching 😄

  • @LiliaCriollo
    @LiliaCriollo 6 місяців тому +1

    This is the best explanation for Window Functions, even for courses where you need to pay. Thank you

    • @mo-chen
      @mo-chen  6 місяців тому

      I'm so glad you think so! Thanks for watching!

  • @ardianthaputera6970
    @ardianthaputera6970 Рік тому +4

    Thanks Mo, after a while, your explanation on the OVER(PARTITION BY) query is the one that made me understood it best.
    Big thanks.

  • @goodboyvincenzo
    @goodboyvincenzo Рік тому +2

    Omg yes yes! 🎉 been waiting for this since your previous sql video! we really appreciate you, bro!!

    • @mo-chen
      @mo-chen  Рік тому

      Thanks so much for watching Vinnyke 😄

  • @chrisosomo2856
    @chrisosomo2856 6 місяців тому

    Thanks as always Mo, your explanation are always helpful. This is perhaps the best tutorial on Window Functions I have encountered so far

    • @mo-chen
      @mo-chen  6 місяців тому

      Glad it was helpful! Thanks a lot for watching!

  • @muhammadomer1654
    @muhammadomer1654 3 місяці тому

    Really loved the way you are explaining these concepts with some business approaches + using other concepts within the window function👌

  • @offthepathworks9171
    @offthepathworks9171 Рік тому +1

    Pretty cool, not a lot of WINDOW and analytical queries out on youtube, definitely a solid niche to be explored. Thanks 👍.

  • @madhumitha.m586
    @madhumitha.m586 26 днів тому

    You'r content was just amazing sir ,im currently learning Sql and other tech skills for data analyst your video help to get ideas abt data analysis.

  • @ismailsaber2759
    @ismailsaber2759 Рік тому

    This is by far the best explanation of Window functions I've ever watched, thank you so much for your efforts 👏👏

    • @mo-chen
      @mo-chen  Рік тому

      Glad it was helpful!

  • @zakiazia8372
    @zakiazia8372 10 місяців тому

    one if the best tutorials on window function .. thanks a lot for your effort ..waiting for more :)

  • @mumk
    @mumk Рік тому

    Learned a lot in this video, thank you so much. This is much more relatable when I have years of working experience than in college

  • @RafjanShawon
    @RafjanShawon 5 місяців тому

    You are Amazing as a Teacher

  • @Curic-Ivan
    @Curic-Ivan Рік тому

    So far the best explanation of window function! Thank you!

  • @BaturalpAkin
    @BaturalpAkin Рік тому +1

    Thank you for the tips! Window functions are very important to understand especially for data analyst technical interviews.

    • @mo-chen
      @mo-chen  Рік тому +1

      Thanks so much for watching Baturalp 😃 I'm glad you liked the video!

  • @cionsamuel9065
    @cionsamuel9065 9 місяців тому +1

    This really cleared things up for me on the topic. Thank Mo!

  • @arneshguru4263
    @arneshguru4263 5 місяців тому

    Wooh! that’s some sort of content. Got my basics cleared😁.

    • @mo-chen
      @mo-chen  5 місяців тому

      Glad it was helpful!

  • @YaTianLee-j5c
    @YaTianLee-j5c Рік тому +1

    Hi Mo, thanks for yur video! This is really helpful , the content is very clear and straight forwards.
    Keep it up.

    • @mo-chen
      @mo-chen  Рік тому

      That's very kind of you to say! Thanks so much for watching 😃

  • @euclidasare339
    @euclidasare339 11 місяців тому

    beautiful stuff. Thank you from Ghana!!

  • @MachinoLearno
    @MachinoLearno Рік тому +1

    Great content. Greetings from Brazil

    • @mo-chen
      @mo-chen  Рік тому

      hey IHAS 👋 Thanks a lot for watching!

  • @subhraorhaw5551
    @subhraorhaw5551 Рік тому

    this is amazing, i was searching for these content for such a long time, Thank you MO

    • @mo-chen
      @mo-chen  Рік тому

      Glad you found it useful! Thanks for watching 😃

  • @angelocastilloperz
    @angelocastilloperz Рік тому +1

    I would love to go to Japan and the US one day my friend. 💯Thanks for the content.

    • @mo-chen
      @mo-chen  Рік тому +1

      Can't argue with that! I've been to California a couple of times, but would love to visit Japan myself too! Thanks a lot for watching 😃

  • @nikhilg9737
    @nikhilg9737 11 місяців тому

    perfectly explained!👌👌👌👌

  • @kn5372
    @kn5372 6 місяців тому

    That was awesome. Thank you!

  • @HalpPlsxx01
    @HalpPlsxx01 Рік тому +1

    Lets go Mo!!!! Thanks for this!!! 👌👍🙏

    • @mo-chen
      @mo-chen  Рік тому +1

      Great to see you again on the channel! Thanks for watching Alvin 😃

    • @HalpPlsxx01
      @HalpPlsxx01 Рік тому

      @Data With Mo no problem bro! Always here for the rich content! I started learning SQL last week since I have a advance understanding of python now. Looking to transition and learn advance skills in SQL to land a job at at the market. 👍👌🙏

  • @CaribouDataScience
    @CaribouDataScience Рік тому +1

    Thanks, a lot of good info.

    • @mo-chen
      @mo-chen  Рік тому +1

      Thanks for watching Caribou Data Science!

  • @elfridhasman4181
    @elfridhasman4181 Рік тому +1

    Thank you, Wow, your explanation very very Good

    • @mo-chen
      @mo-chen  Рік тому

      Thanks so much for watching Elfrid 😁

  • @pablopelaez9196
    @pablopelaez9196 Рік тому

    Mo, Im a huge fan of the channel! You have very good info! Just one feedback on this video. You start running without us knowing how to run 😂. Maybe for a next time a short introduction of the different type of functions and why to use them, would be great. For the rest, thanks... as always! 🤩🤩

  • @ahmedelgendy12
    @ahmedelgendy12 Рік тому

    BEST OF THE BEST .. Many thx. clear & to the point

  • @kastenkarsten
    @kastenkarsten Рік тому

    This is an super amazing introduction to this topic. BIG THANKS for this! You did absolutely incredible work demonstrating this!
    But I have a question, which I cannot find be covered anywhere: Is it somehow possible to use value(s) from the current row and compare them them to any other row in the windows?
    Let's say, to stick with your example: I want to find the FIRST_VALUE booking_id over the entire resultset, whose price is 2* the price of the current row and if there is no such one, then just put a NULL in the column of the current row.
    Is it possible to do this using Window Functions only?
    Thanks in advance and best regards.

  • @mohitsahu9519
    @mohitsahu9519 Рік тому +1

    Really helpful ❤

    • @mo-chen
      @mo-chen  Рік тому

      Thanks so much for watching Mohit 😄

  • @Alester_edits
    @Alester_edits Рік тому

    please make a video on which courses we should take to be a data analyst , there's a bunch of courses and videos but we don't know which one is the absolute best and appropriate for the industry .

    • @mo-chen
      @mo-chen  Рік тому

      Hi Alester 👋 Please check out my roadmap here datawithmo.com/. This should help 😃

  • @aryashahdi2790
    @aryashahdi2790 8 місяців тому

    Dude, you're good. Cheers!

  • @mocococo2877
    @mocococo2877 10 місяців тому

    Thank you so so much for this nice tutorial.
    I can only say that it would be a bit clearer if you use ORDER BY when you used PARTITITON BY for the same column/s. Because without it results are scattered and and difficult to follow.
    Also. please, could you explain for your last real world example, will the column before the last be the same if you used DENSE_RANK ??
    Thank you.

  • @nikjojo
    @nikjojo Рік тому

    you ever had any SQL/Python coding tests during interviews?

    • @mo-chen
      @mo-chen  Рік тому

      Not actual coding tests but walking people through how I would solve the problems using code yes. Thanks a lot for watching!

    • @kevingonzalo9087
      @kevingonzalo9087 Рік тому

      nice comment

  • @prashlovessamosa
    @prashlovessamosa Рік тому +1

    Thanks Mo

    • @mo-chen
      @mo-chen  Рік тому

      Thanks for watching Prashant 😃

  • @marialaura9493
    @marialaura9493 Рік тому

    this is pretty cool, thanks for the video!

    • @mo-chen
      @mo-chen  Рік тому

      Glad you liked it!

  • @Niranga.555
    @Niranga.555 Рік тому +1

    Thanks for the super content...

    • @mo-chen
      @mo-chen  Рік тому

      Thanks for watching Niranga 😃

  • @sukriti5377
    @sukriti5377 Рік тому

    can this be used with mysql as well????

  • @Watchme2602
    @Watchme2602 8 місяців тому

    the bonus question can we also do like where rank

  • @willmario7436
    @willmario7436 Рік тому

    Hello,
    I just wanted to ask at 24min29sec, instead of having all the code in a subquery named a and inside a query to filter the top3, wouldn't be easier to have one sole query and adding at the end a "HAVING top3_flag = "Yes" " ?

  • @manognavengala5278
    @manognavengala5278 Рік тому +1

    I am waiting for this one

    • @mo-chen
      @mo-chen  Рік тому

      Nice one! Hope you liked it 😃

  • @nyakehkallon6597
    @nyakehkallon6597 Рік тому +1

    Big Mo 🤝.

    • @mo-chen
      @mo-chen  Рік тому

      Thank you for watching 😃

  • @bellegraves
    @bellegraves Рік тому +4

    Am I watching because I want to learn about data analytics or because he’s very handsome? Yes. The answer is yes.

  • @peterodesola5056
    @peterodesola5056 4 місяці тому

    Thank you so much

    • @mo-chen
      @mo-chen  4 місяці тому

      I'm glad you liked the video!

  • @grapefruitomega3517
    @grapefruitomega3517 Рік тому +2

    I’m here again for knowledge and your handsomeness - what a great deal 🤤

    • @mo-chen
      @mo-chen  Рік тому

      Thank you so much for sticking around on the channel!

  • @Universal-Code23.
    @Universal-Code23. Рік тому

    How I can learn Data analysis in a month fast? Please give me a roadmap.

    • @mo-chen
      @mo-chen  Рік тому

      Please see a roadmap here datawithmo.com/

  • @husseinhadliye2992
    @husseinhadliye2992 Рік тому

    explain the OVER Clause

    • @mo-chen
      @mo-chen  Рік тому

      It is explained throughout the video. Please feel free to check out other learning resources if my explanation didn't get across 😁 Thanks a lot for watching!

  • @gourabsarker9552
    @gourabsarker9552 Рік тому

    Sir do you earn 100000 pound sterlings a year in UK? Plz reply. Thanks a lot.

    • @mo-chen
      @mo-chen  Рік тому

      My organisaton pays me well but I don't want to disclose how much exactly. You can find lots of salary information on Glassdoor. Thanks for watching Gourab!

  • @YR-up8vk
    @YR-up8vk Рік тому

    Great video as always!
    I would like to make a suggestion. Tbh, you could remove your face off the screen when it comes to teaching/showing things on the screen. This way, we could have a better focus on the learning and we won't be blocked from any important details we need to see.

    • @mo-chen
      @mo-chen  Рік тому +1

      Thank you for watching! Noted 😃 In this video, there's nothing happening at the top right, that's why I left my face there.

    • @YR-up8vk
      @YR-up8vk Рік тому

      @@mo-chen Totally understand your motive, but it can be a little distracting for learners 😅

  • @simonoganga9535
    @simonoganga9535 Рік тому +1

    Mine is Bora Bora Mo.

    • @mo-chen
      @mo-chen  Рік тому

      Great to have you here on the channel Simon 😃

  • @alkitabkebenaran
    @alkitabkebenaran Рік тому

    I don't think data analyst job is a bright future anymore.
    It will be replace by AI so quick, cause AI grow faster than we can imagine.

    • @mo-chen
      @mo-chen  Рік тому +1

      Like I said, I welcome AI onboard. Being a data analyst is not just about writing code which AI is very good at. I'm more than happy for AI to do all of my boring, repetitive tasks such as data cleaning and transformation. You need to understand the business problems, engage with your stakeholders to come up with solutions, dashboards, processes that suit their needs. AI will certainly change the job tasks of data analysts, in a good way I believe - as rather than spending time doing monotonous tasks, I can spend more time doing value-add tasks.

  • @ardianthaputera6970
    @ardianthaputera6970 Рік тому

    Hi everyone, just a quick question if anyone has any idea on this issue.
    I tried importing the .csv to populate the table using psql and it works all right.
    However, I was curious and tried to import it via "right-click on the bookings table, import/exoprt data" and got this error message:
    ERROR: invalid input syntax for type integer: "40.76489"
    CONTEXT: COPY bookings, line 9, column host_id: "40.76489"
    I tried exploring on why this happens and found out that postgre didn't manage to read the .csv file as well as via psql. I already made sure that every data constraints are correct, alrady check the 'header' option, and made sure the delimiter is comma (,)
    I'm trying to explore any possibilities to troubleshoot things myself, but ended up stuck hahaha