ZS Associates SQL Interview Question ( Medium Level) | Consecutive Available Seats 💡

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

КОМЕНТАРІ • 10

  • @utkarshakulkarni1494
    @utkarshakulkarni1494 Місяць тому

    Simply & superb

  • @soham_2
    @soham_2 Місяць тому +1

    Amazing question

  • @PriyaK_27
    @PriyaK_27 Місяць тому

    Simply superb, eager to practice more SQL with your other videos !

  • @pranavmahendra3423
    @pranavmahendra3423 Місяць тому

    Fantastic explanation, ma'am!
    Great teaching 👏👏👏
    I loved how you solved the problem in a complex manner and then used a self-join to reduce the complexity.
    This video also helped me understand how powerful joins in SQL are.
    Looking forward to more videos on SQL.
    Thank you!

    • @DatacraftingWithSneha
      @DatacraftingWithSneha  Місяць тому +1

      Thank you so much! 😊 I'm really glad you found the video helpful. Your support means a lot! Please don't forget to like, share and subscribe the video ,it motivates me to keep creating more videos.

  • @harshitsalecha221
    @harshitsalecha221 Місяць тому

    SELECT seat_id FROM (SELECT seat_id,LEAD(seat_id) OVER(ORDER BY seat_id)-seat_id as lddiff,
    seat_id-LAG(seat_id) OVER(ORDER BY seat_id) as lgdiff
    FROM cinema
    WHERE free=1) as a
    WHERE lddiff=1 OR lgdiff=1;

  • @yashpise789
    @yashpise789 Місяць тому +1

    I had a question that this was the only coding question asked here and also , was it an online interview? and also some other questions I want to ask you, because I have an interview on Thursday

    • @DatacraftingWithSneha
      @DatacraftingWithSneha  Місяць тому

      I got this question from the Code360 platform, which offers SQL interview questions from various companies. If you have any questions, feel free to connect with me on LinkedIn and ask. Best of luck with your interview!