SQL Interview questions | Data Analyst | Part - 5

Описание к видео SQL Interview questions | Data Analyst | Part - 5

This video is the fifth part of our series on SQL interview questions and answers. This series is specifically designed for people targeting jobs as data analysts, data scientists, data engineers, and business analysts.

In this video, I have explained how to get the organization hierarchy in two steps
1) Finding the managers of all the employees using self_join()
2) Doing the first step but in sequential order using Recursive_CTE()

Use the below the commands to create your own database and table:
CREATE DATABASE themlmine;
USE themlmine;

CREATE TABLE emp (
emp_id int unique,
Name varchar(20),
manager_id int);

INSERT INTO emp VALUES
(10, 'Rakesh', 15),
(21, 'Satyam', 40),
(15, 'Shiva', 21),
(40,'Akshita', null),
(101,'Anurag', 40);

You can download the final script from here: https://drive.google.com/file/d/1bNCF...

Learn SQL from scratch:    • SQL Tutorial for beginners | Part - 1...  

Instagram:   / the_ml_mine  

Timestamps:
00:00 Intro
00:05 Interview question
01:29 MySQL workbench
02:35 Writing SQL query
03:40 Self Join (Part - 1)
07:06 Recursive CTE (Part - 2)
15:00 Outro

Комментарии

Информация по комментариям в разработке