SQL Interview Questions and Answers Series | HackerRank | Binary Tree Nodes (MEDIUM)

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 มิ.ย. 2024
  • Master Advanced SQL Selects for Interviews!
    This video tackles a SQL challenge from HackerRank, focusing on advanced SELECT statements. Conquer your next data analyst interview by learning how to solve this problem and similar ones!
    #sql #sqlinterviewquestions #sqlserver #sqltraining #hackerranksolutions #hackerrank #hackerranksolution #sqlforbeginners #sqltips #sqlite #interviewpreparation #interviewprep #interviewquestionsforfreshers #interviewtips #dataanalysts #sqlfordataengineer #programming

ความคิดเห็น • 5

  • @rohitconnect
    @rohitconnect 18 วันที่ผ่านมา +1

    Hey Nishtha, i was looking for explanation for some of the logic for these Queries. thanks for making these videos. very helpful

  • @badrilalnagar9232
    @badrilalnagar9232 22 วันที่ผ่านมา +1

    उन्हें मत सराहो, जिन्होंने अनीति पूर्वक धन कमाया और सफलता पाई।

  • @sayanbanerjee7214
    @sayanbanerjee7214 17 วันที่ผ่านมา

    Your solution looks kinda complicated.....
    "select N,
    case
    when (P is null) then 'Root'
    when N IN (select P from BST) then 'Inner'
    else 'Leaf'
    end
    from
    BST
    order by
    N;"...I think this one looks more intuitive to understand for beginners....though the solution has a sub-query....(I hate sub-queries myself!)

    • @datasciencewithnish
      @datasciencewithnish  17 วันที่ผ่านมา +1

      @@sayanbanerjee7214 We could have done it using sub-query, No doubt. But writing subqueries always doesn’t give us efficient results. Instead, CTEs are far more prioritised when it comes to optimizing a sql query. Most recruiters focus on testing your ability to write CTEs. However, I appreciate your solution :)