Data Science SQL Interview Question and Answer | Airbnb

Поделиться
HTML-код
  • Опубликовано: 30 июн 2024
  • 🚀 Prep SQL with sql.datainterview.com/
    ====== ✅ Details ======
    Love it or hate it - solving the SQL question correctly with speed can make or break your interview success.
    That's why in this video, I share:
    👉 Three tips that helped clients ace SQL rounds in MAANG companies
    👉 Daetama - an SQL practice pad with 100 interview questions
    👉 A walkthrough of an Airbnb SQL interview question
    ⭐ Daetama is a new DataInterview product that will allow you to practice code on a web browser. Get access to 100 FAANG-style SQL questions curated and solved by data scientists at Google and Meta.
    Start practicing your SQL here 👉 sql.datainterview.com/
    🚀 Looking for data science interview prep? Check out: datainterview.com/
    👍 Make sure to subscribe, like and share!
    ====== ⏱️ Timestamps ======
    00:00 - How to prepare for data science SQL interview questions
    00:33 - Tip #1
    01:39 - Tip #2
    03:19 - Tip #3
    04:23 - Airbnb SQL question
    ====== 📚 Other Useful Contents ======
    1. How to Ace Product Metric Questions 👉 bit.ly/3xeCgOl
    2. Cracking Data Science Business Cases 👉 bit.ly/3trCHDP
    3. Crack the Amazon Data Scientist Interview 👉 bit.ly/3MyC6XJ
    ====== Connect ======
    📗 LinkedIn - / danleedata
    📘 Medium - / datainterview

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

  • @Aidan_Au
    @Aidan_Au Год назад +4

    I have used Daetama for over 1 month now. I practice SQL every day.
    I absolutely recommend anyone who wants to get good at data science interviews to get this tool.

  • @Soccergods7
    @Soccergods7 Год назад +1

    I haven't used the Over clause before. It makes things very intuitive if you do use it. Great video!

  • @sm8100
    @sm8100 Год назад +3

    There is a flaw in the logic. The first month of an year, should also have a last month's rent. That is not getting considered here. This can be resolved by filtering by year in the last step, rather than the first cte. Also coalesce is not required as lag function itself has a parameter(3rd parameter) that can be specified to take care of null values.

    • @guptabhishek
      @guptabhishek 11 месяцев назад

      Good catch on the lag parameters

  • @fenrir433
    @fenrir433 Год назад +2

    Love the video and super helpful! Can you do a video explaining more on tips for gauging when/where to use Subqueries vs Cte for sql code/dashboard efficiency?

    • @DataInterview
      @DataInterview  Год назад +2

      Thanks Kenny! I would say that the primary difference between subquery vs CTE really boils down to readability, less on the efficiency. When I was a DS at Google, and building dashboards, there was a set of peer review checks done before my SQL code was submitted to Google's production system. One feedback I received was instead of using a series of nested subqueries, decouple it into CTEs to ensure that colleagues can read this clearly. Hope this helps! Others, any thoughts?

    • @fenrir433
      @fenrir433 Год назад +1

      @@DataInterviewMakes sense! Can you explain then in efficiency terms why filtering before a join be more efficient than after a join? or vice versa? Thank you!

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

    How do you know when a block of code should be wrapped within a CTE? I understand all the SQL functions and their syntax, but I'm struggling to understand the logical order of how to structure the entire query. When asked a question and there are a number of keywords involved like counts/ranks/averages, how do I know which functions should go within a CTE, and which in the final output query? Just looking for general tips on how to structure a solution.
    Thanks.

  • @TheRaju991
    @TheRaju991 Год назад +1

    Nice Video

  • @guptabhishek
    @guptabhishek 11 месяцев назад +1

    At 1:28 you only change the sequnce of code, but SQL already implements where before group by.
    How is that changing anything?

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

      Exactly. I think it is not a good example too. There is inherit running order of SQL clause

  • @AnalyticsWithVipul
    @AnalyticsWithVipul 5 месяцев назад

    Get more SQL questions on my RUclips channel. Here is a sample video: ruclips.net/video/h1fkLMRKOWA/видео.htmlsi=CEdEscBOzclrZi4m

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

    Although this was a nice video to watch, AirBnB is not a meaningful business model as not every rental house deserves its price based on the quality and customer experience in my personal perspective.