leetcode premium | 3236 | ceo subordinate hierarchy | recursive cte

Опубликовано: 24 Февраль 2026
на канале: DEwithDhairy
738
26

-- Create table statement
CREATE TABLE employees (
employee_id INT PRIMARY KEY,
employee_name VARCHAR(50),
manager_id INT,
salary INT,
FOREIGN KEY (manager_id) REFERENCES employees(employee_id)
);

-- Insert statements
INSERT INTO employees (employee_id, employee_name, manager_id, salary) VALUES
(1, 'Alice', NULL, 150000),
(2, 'Bob', 1, 120000),
(3, 'Charlie', 1, 110000),
(4, 'David', 2, 105000),
(5, 'Eve', 2, 100000),
(6, 'Frank', 3, 95000),
(7, 'Grace', 3, 98000),
(8, 'Helen', 5, 90000);

Website for all leetcode premium SQL Questions : https://sqlunlocker.onrender.com/?sor...

Your Queries :
=============
what is recursive cte in sql
leetcode premium sql questions
sql scenario based interview questions and answers
sql interview questions and answers
ceo subordinate hierarchy
leetcode 3236
leetcode sql

Need Help ? Connect With me 1:1 - https://topmate.io/dewithdhairy

Let's connect on LinkedIn :   / dhirajgupta141  

pyspark 30 days challenge :    • pyspark 30 days challenge  

top interview question and answer in pyspark :
   • top interview questions and answers in pys...  

PySpark Installation and Setup :    • Spark Installation | PySpark Installation ...  

DSA In Python Interview Series :    • dsa for data engineer | dsa for data analy...  

PySpark Interview Series :    • pyspark interview questions and answers  

Pandas Interview Series :    • pandas interview questions and answers  

SQL Interview Series :    • sql interview questions and answers  

#sql #leetcode #pyspark #youtube #dataengineers #coding #interview #faang