Hi, this is Rajanikanth Gaja and I post videos on Computer Science related concepts, especially data-related technologies, these videos will help you in interviews as well as in clearing your theory and coding questions. If this channel helped you even a bit, please consider subscribing to the channel.
If you need any personal help in SQL, Mock interviews, or Coding help You can contact me at [email protected], Please note it will be charged.
Thank you :)
In this video we are going to discuss on SQL interview problem asked in Amazon interview for Business Analyst position. This question will be solved using double SQL self join concept.
✨ Work-related E- emails can be sent to: [email protected]
script:
create table emp_tbl(
emp_id int,
emp_name varchar(20),
department_id int,
salary int,
manager_id int,
emp_age int);
insert into emp_tbl
values
(1, 'Rajinikanth', 100,10000, 4, 39)
insert into emp_tbl
values (2, 'Nirmal', 100, 15000, 5, 48);
insert into emp_tbl
values (3, 'Vikas', 100, 12000,4,37);
insert into emp_tbl
values (4, 'Suresh', 100, 14000, 2, 16);
insert into emp_tbl
values (5, 'Mudit', 200, 20000, 6,55);
insert into emp_tbl
values (6, 'Agam', 200, 12000,2, 14);
insert into emp_tbl
values (7, 'Sanjay', 200, 9000, 2,13);
insert into emp_tbl
values (8, 'Ashish', 200,5000,2,12);
insert into emp_tbl
values (9, 'Mukesh',300,6000,6,51);
insert into emp_tbl
values (10, 'Rakesh',500,7000,6,50);