No video

SQL Interview Question - Solution | Data Analyst | Data Engineer (Part -I)

  Рет қаралды 1,136

MeanLifeStudies

MeanLifeStudies

Күн бұрын

In this video, we will solve two Data Analyst Interview Questions.
i. Find Top salaried employees in each department.
#sql #dataanalyst #dataengineers
ii. Find Employees earning more salary than their department's average salary.
We will solve these problems using Window functions in SQL.
For a Quick Call or do you want to discuss any doubt in the data analytics field (Data Analyst / Data Engineer / Data Scientist / Power BI Developer / Business Analyst Roles) with me don't hesitate to book a call through my Topmate.io profile.
topmate.io/mah...
My medium blogs: / mahendraee204
My github: github.com/mah...
Here are the table create and insert statements:
-----------------------------------------------------------------------------
create table employee (
employee_id int,
employee_name varchar(20) ,
age int ,
department varchar(20) ,
salary int
)
insert into employee values
(1, 'Amit Sharma', 30, 'Engineering', 75000),
(2, 'Neha Verma', 27, 'Marketing', 65000),
(3, 'Ravi Kumar', 35, 'Sales', 80000),
(4, 'Priya Singh', 29, 'HR', 60000),
(5, 'Suresh Gupta', 40, 'Finance', 90000),
(6, 'Anita Joshi', 32, 'Engineering', 70000),
(7, 'Rahul Patil', 26, 'Marketing', 62000),
(8, 'Sneha Desai', 38, 'Sales', 85000),
(9, 'Vikas Nair', 31, 'HR', 61000),
(10, 'Pooja Iyer', 45, 'Finance', 95000),
(11, 'Karan Mehta', 28, 'Engineering', 68000),
(12, 'Alok Pandey', 34, 'Marketing', 67000),
(13, 'Geeta Menon', 36, 'Sales', 82000),
(14, 'Nisha Pillai', 41, 'HR', 62000),
(15, 'Vivek Reddy', 37, 'Finance', 88000),
(16, 'Sanjay Kulkarni', 33, 'Engineering', 72000),
(17, 'Rekha Bhatt', 29, 'Marketing', 64000),
(18, 'Manoj Yadav', 43, 'Sales', 83000),
(19, 'Deepa Rao', 39, 'HR', 63000),
(20, 'Ramesh Chandra', 42, 'Finance', 91000),
(21, 'Mahendra' , 30, 'Engineering', 75000),
(22, 'Mahi', 32, 'Marketing', 67000);

Пікірлер: 3
@ghoshsubhosmita
@ghoshsubhosmita 2 ай бұрын
Thank you for sharing..
@himanshushorts7143
@himanshushorts7143 Ай бұрын
1st problem with cte as (select *,dense_rank() over(partition by department order by salary desc) as r from employees) select * from cte where r = 1;
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 46 МЛН
ISSEI & yellow girl 💛
00:33
ISSEI / いっせい
Рет қаралды 25 МЛН
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 2,8 МЛН
Чёрная ДЫРА 🕳️ | WICSUR #shorts
00:49
Бискас
Рет қаралды 6 МЛН
The 25 SQL Questions You MUST Know for Data Analyst Interviews
32:47
KSR Datavizon
Рет қаралды 215 М.
Learn SQL Basics in Just 15 Minutes!
16:57
Kenji Explains
Рет қаралды 142 М.
Stored Procedures in MySQL | Advanced MySQL Series
12:37
Alex The Analyst
Рет қаралды 41 М.
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 46 МЛН