SQL Interview Question - Solution (Part - IV)

Описание к видео SQL Interview Question - Solution (Part - IV)

In this video, we solved a counter question that is been asked frequently in most recent interviews in data engineer or data analyst interviews.

#interview #sqlwindowfunctions #datascience #sql #sqlfunctions

You can see my GitHub and Medium blog links below for more information.
  / mahendraee204  
https://github.com/mahendra204

Q) Return Employee details who earn a higher salary than the average salary of all managers in the organization.

Table Creation and Insertion Statements:
------------------------------------------------------------------
create table employee (
empid int,
empname varchar(50),
mgrid int,
salary int
);

insert into employee values
(1, 'mahendra', 2, 25000),
(2, 'mahi', 5, 20000),
(3, 'sam', null, 45000),
(4, 'dev', 1, 20000),
(5, 'dash', 3, 97000),
(6, 'pratik', 6, 30000),
(7, 'singh', 2, 40000),
(8, 'rao', 5, 80000);

Комментарии

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