Movie Rating | Leetcode 1341 | Crack SQL Interviews in 50 Qs

Поделиться
HTML-код
  • Опубликовано: 2 дек 2024

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

  • @learnwithchirag
    @learnwithchirag  8 месяцев назад

    Hey there! 👋 For more interesting content, tutorials, and updates, Feel free to connect with me on
    Instagram Handles :-
    @createwithchirag - instagram.com/createwithchirag/
    @learn.with.chirag - instagram.com/learn.with.chirag/
    LinkedIn: www.linkedin.com/in/chirag-sehgal-9200111b8/
    Let's stay connected and keep the creativity flowing! 💡

  • @krishnabohidar7226
    @krishnabohidar7226 Месяц назад

    Thanks for easy and simple explanation :)

  • @sandeepvarma89
    @sandeepvarma89 9 месяцев назад +1

    Bhai count(user_id) karna tha first part mein yaa count(rating)kyunki rating toh movies ki hai aur count of users toh user_id se hogi na?

    • @learnwithchirag
      @learnwithchirag  8 месяцев назад

      In the first part of the query, you can use COUNT(rating) instead of COUNT(movie_id) & COUNT(user_id) because the rating attribute in the MovieRating table represents the number of ratings given by users for movies. So, all the three COUNT(rating) ,COUNT(movie_id) and COUNT(user_id) would give you the count of ratings given by each user, and ordering by either of them would achieve the same result in this specific context.
      But yes you are correct , COUNT(user_id) is the best choice among the three options for this specific scenario, as it provides clarity, aligns with the semantics of the task, and accurately represents the count of ratings given by each user.

  • @filmytrendz4990
    @filmytrendz4990 3 месяца назад

    How lexicographically smaller is working in this query ?

  • @VickyShrivastav-oi4pm
    @VickyShrivastav-oi4pm 6 месяцев назад

    best explanation

  • @SumanSadhukhan-md4dq
    @SumanSadhukhan-md4dq 5 месяцев назад

    It's evident that currently you are so good at sql but how do you develop this skill?

    • @learnwithchirag
      @learnwithchirag  4 месяца назад +3

      Just keep practicing a few queries daily....I believe after solving 50-60 questions you will get enough confidence to think and solve in the exam/interview...💯
      Also Time to time revision is must !!

  • @utkarshsharma1185
    @utkarshsharma1185 8 месяцев назад

    Thanks