SQL Interview - Employee Manager Hierarchy - Self Join #sqlinterviewquestions

SQL Interview - Employee Manager Hierarchy - Self Join #sqlinterviewquestions

Learn at Knowstar

4 года назад

43,813 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Gudia Toka
Gudia Toka - 12.10.2023 19:04

left join should be better as it skip top manager id with inner join

Ответить
lakshay sharma
lakshay sharma - 23.05.2023 09:21

Thanks for the informative video. Also, can you help with the insert code for the data?

Ответить
Suryakanth Bhullha
Suryakanth Bhullha - 07.03.2023 08:39

Thanks, if you added table populated script that will very helpful.

Ответить
Radhika Sinha
Radhika Sinha - 09.10.2022 08:06

can you help me solving a sql query for a database that contains three tables, AAID,cookies, IDAF
Column Headers
● Id_type
○ AAID
○ IDFA
○ Cookie
● Device_id
● Hashed_email (SHA256)
● Timestamp
○ Unix timestamp
● Ip_address
● Opted_out
○ 1, 0
○ 1 = opted out

Querys are
● Where device_id appears more than once AND has ID type IDFA & AAID - Delete all
● IF hashed email matches more than 50 IDs (sum of cookie, idfa, aaid) - Delete all
can this be deleted in single query?

Ответить
Abdullah Ali
Abdullah Ali - 15.09.2022 02:18

If you share SQL query in the description would be so helpful

Ответить
Ujjwal Tarway
Ujjwal Tarway - 12.09.2022 20:06

WoW simply wonderful😇

Ответить
Kishore Kumar
Kishore Kumar - 16.07.2022 13:30

You did for one level only, you can't get full & complete hierarchy with just one self join, if you can make it plz share

Ответить
Sai Shellikeri
Sai Shellikeri - 25.06.2022 14:27

|----------------------------------------|
| abc / def /abc |
| abc def / abc / def |
| abcc/ def // abc/ abc |
| --------------------------------------|
this is the question what query should I write to get this answer
ANS--- |----------------------------|
| abc /def |
| abc/ def /def |
| abcc/ def/ |
|----------------------------|
it's an interview Question

Ответить
Gagan Singh
Gagan Singh - 29.05.2022 18:06

Thank you mam for making such an amazing videos on sql , I have practice most of your videos of playlist 62 videos ..... Keep posting amazing videos

Ответить
Pooja Singh
Pooja Singh - 09.03.2022 12:45

Please make video for full hierarchy like parents ,son ,
Grand parents , grand children

Ответить
harsha muniswamy
harsha muniswamy - 24.10.2021 12:52

What is the difference between union and Superlative Union?

Ответить
Suraj Patil
Suraj Patil - 15.10.2021 18:48

Thank you... your content is truly informative

Ответить
Satchidananda Tripathy
Satchidananda Tripathy - 19.09.2021 03:06

This is not hirearchy. hirearchy means a particular employee's entire hirearchy

Ответить
Sai Leela Vamsi Krishna Korada
Sai Leela Vamsi Krishna Korada - 18.09.2021 10:53

I was asked to find all direct and indirect subordinates with given manager name🤦🏻‍♂️

Ответить
sumit gandhi
sumit gandhi - 23.10.2020 21:39

great video , Thanks

Ответить
Ravindra Sutar
Ravindra Sutar - 11.08.2020 13:02

thanks its really helpful

Ответить
Nikhil kumar Chaudhary
Nikhil kumar Chaudhary - 30.07.2020 11:55

kindly share how to print this hierarchy in single column like --> adam->natasha->mark in single column

Ответить
Kristy Owens
Kristy Owens - 14.07.2020 06:47

very useful. I have been asked this question many times in interviews.

Ответить
Priyanka Devarapalli
Priyanka Devarapalli - 01.07.2020 06:57

why is it not mentioned as self join in self join and mentioned as inner join?

Ответить
sara da costa
sara da costa - 17.05.2020 00:10

How will you query to identify the circular references in employees and manager relationship?

Ответить
Kristi Dumais
Kristi Dumais - 17.04.2020 00:30

Thank you so much!!!

Ответить
Learn at Knowstar
Learn at Knowstar - 18.03.2020 19:41

Have you been asked a SQL query interview question that you couldn't answer?

Let us know in the comments below and we will answer those in our upcoming videos!

Ответить
AK1007
AK1007 - 18.03.2020 18:12

The Boss who's value is Null record not appeared in the output, please check once...

Ответить
Narayana Gottipati
Narayana Gottipati - 18.03.2020 17:27

Great video. Please upload this type of queries mam...Thanks

Ответить