No video

SQL Interview Question | How to find all levels of Employee Manager Hierarchy | Recursion

  Рет қаралды 30,083

Learn at Knowstar

Learn at Knowstar

Күн бұрын

How to install SQL Server for practice?
• How to install SQL Ser...
Another realtime scenario in which the same approach will be useful is finding the family tree.
Must Do Data Analytics Certifications -
Google Data Analytics Professional Certificate
imp.i384100.ne...
Google Advanced Data Analytics Professional Certificate
imp.i384100.ne...
Practice SQL Queries on Your Browser through Interactive Courses -
learnsql.com/?...
Please do not forget to like, subscribe and share.
For enrolling and enquiries, please contact us at
Website - knowstar.org/
Instagram - / learn.knowstar
Blog - know-star.blogs...
Facebook - / knowstartrainings
Linkedin - www.linkedin.c...
Email - learn@knowstar.org

Пікірлер: 42
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Register at the below link to get US $100 off for Coursera Plus membership between Sep 8 - Sep 29, 2022. The Coursera Plus membership gets you access to unlimited courses and unlimited certifications! imp.i384100.net/Ke51on
@user-ld1dw9so3i
@user-ld1dw9so3i Жыл бұрын
we have our Mam Foqia khan, whose voice is totally like you and she is also a DBA.🤗
@kristyowens2284
@kristyowens2284 2 жыл бұрын
Very easy to follow. Beautifully explained!
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you
@zuhebkhan6973
@zuhebkhan6973 2 жыл бұрын
Thanks for all ur support in sharing knowledge... Ma'am just a request I'm new to Sql world..... Plse prepare some videos on procedure with great example as its good becoz lots of questions were asked in interviews Thanks in advance Zuheb
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you. We are planning a video soon. Stay tuned!
@vishwas22khare
@vishwas22khare 2 жыл бұрын
Very nice explanation
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you
@rickrogers615
@rickrogers615 2 жыл бұрын
Thank you so much for sharing this video! I really appreciate your pacing of the video where it is easy to follow. One question, how can you just out put each manager hierarchy level for all employees by column. For example, column shows all rows with the manager level of one. The second column would list all employees with the second hierarchy level and so on. I am trying to build self adjusting hierarchy level columns for use in a Power BI model where teams can change their parent team id or have new teams created or others made in active. Thank you!
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you. You might need to filter on employee level to select the required columns or you might be able to use pivot for your requirements. Below is the link for sql pivot tutorial which might be useful. kzfaq.info/get/bejne/q7qPjZWHtZi-Ymg.html
@balajiveerasingam3602
@balajiveerasingam3602 2 жыл бұрын
Thanks for sharing your knowledge. It help us really
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Glad to hear that. Thank you.
@mummz3371
@mummz3371 2 жыл бұрын
Thank you for your video and the great explanation. I really enjoy watching your videos❤️
@dimpyrathore818
@dimpyrathore818 2 жыл бұрын
Awesome explanation
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thanks so much!
@svenkatjkn
@svenkatjkn 2 жыл бұрын
Beautifully explained!
@LearnatKnowstar
@LearnatKnowstar Жыл бұрын
Glad it was helpful!
@gobind289
@gobind289 Жыл бұрын
There is a concept called heirarchyId. Which is more optimized way for large data set. Please make a video on this
@LearnatKnowstar
@LearnatKnowstar Жыл бұрын
Thank you for mentioning this concept. Video coming in next few weeks🙏
@arnohoedelmans
@arnohoedelmans 2 жыл бұрын
Hi can you do a video explaining how to get the hierarchy structure for every employee on one row? Thank you very much!
@asholkkumar4685
@asholkkumar4685 2 жыл бұрын
Query optimization explain in further videos.thanks for ur great time.
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you
@aditidutt6328
@aditidutt6328 2 жыл бұрын
Thanks for this video, How can we find employees who are not having any reportee(parents having no child)
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
you can do a left join on a.empid = a1.mgrid and filter where mgrid is null.
@GDchanaka-he7qr
@GDchanaka-he7qr Жыл бұрын
good explanation. Thank you.
@LearnatKnowstar
@LearnatKnowstar Жыл бұрын
Glad it was helpful!
@jojog2624
@jojog2624 2 жыл бұрын
Nice tutorials! Could you share your demo table data if possible, AdventureWorks sample data I downloaded from microsoft also have difference from yours...
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you. Will try to share the DDLs in upcoming videos!
@hv0032113
@hv0032113 2 жыл бұрын
Thank you for the great explanation.
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you so much.
@saurabhpandey1064
@saurabhpandey1064 2 жыл бұрын
where can we find the database for practicing this ? can you please attach a link . Your videos are very helpful in preparation.
@swapnaguthi8413
@swapnaguthi8413 2 жыл бұрын
Nice explanation.. Thanks for sharing
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thanks so much!
@satishsharmaphotography
@satishsharmaphotography Жыл бұрын
hey, ive been trying to solve this, for a table containing 2600 employees. but in my case, theere is no emp id with null manager id. what to do in that case.
@_SanchitaPatil
@_SanchitaPatil Жыл бұрын
can we solve it using rank or denserank?
@khushik8994
@khushik8994 2 жыл бұрын
Thank u so much for this video. I have a doubt. In 1st query of CTE, we are mentioning condition where managerID is null then how it is running for all managerID which is not null. Could you please let me know where my understanding is wrong
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
The second part of the query after UNION ALL fetches the employees where manager id is not null. This is an example of recursive query. This is another tutorial based on SQL recursion. You might find it helpful. kzfaq.info/get/bejne/mpx_f5yWqbvMc3k.html We will plan to post a separate tutorial explaining recursive queries. Thank you.
@khushik8994
@khushik8994 2 жыл бұрын
@@LearnatKnowstar Thank u soo much for the detailed explanation...
@johnalfredbulado5272
@johnalfredbulado5272 2 жыл бұрын
can you show your table ? thank you
@inhlam5909
@inhlam5909 2 жыл бұрын
Level: Hard.
@lalithroy
@lalithroy 2 жыл бұрын
Hi Mam, Where can i get the data to practice. Or you can share the SQL script.
@Adinasa2
@Adinasa2 9 ай бұрын
Can someone do this in python
SQL Query | How to dynamically convert rows into columns | Dynamic Pivot
16:18
REAL SQL Interview Problem | Hierarchical data in SQL
22:09
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 21 МЛН
managed to catch #tiktok
00:16
Анастасия Тарасова
Рет қаралды 49 МЛН
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 105 МЛН
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 20 МЛН
Learn & Practice SQL Complex Queries | 10 examples (Must DO for Interviews)
52:42
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 21 МЛН