SQL Interview Questions And Answers Part 64 | SQL questions for Product based companies

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

ItJunction4all

ItJunction4all

5 ай бұрын

SQL Interview Questions And Answers Part 64
Problem Statement :- There are two tables namely Job_Positions and Job_Employees
Write an SQL query to get the expected output as shown in next slide. Basically it should display not filled posts as ‘Vacant’ along with the details of the employee:-
-------------------------------------------------------------------------
𝗝𝗼𝗶𝗻 𝗺𝗲 𝗼𝗻 𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:🔥
-------------------------------------------------------------------------
*Instagram :
/ itjunction4all
*Twitter:
/ sunilkr5672
-------------------------------------------------------------------------
Table and Insert SQL Script :
-------------------------------------------------------------------------
create table job_positions
(
id int,
title varchar(100),
groups varchar(10),
levels varchar(10),
payscale int,
totalpost int
);
insert into job_positions values (1, 'General manager', 'A', 'l-15', 10000, 1);
insert into job_positions values (2, 'Manager', 'B', 'l-14', 9000, 5);
insert into job_positions values (3, 'Asst. Manager', 'C', 'l-13', 8000, 10);
create table job_employees
(
id int,
name varchar(100),
position_id int
);
insert into job_employees values (1, 'John Smith', 1);
insert into job_employees values (2, 'Jane Doe', 2);
insert into job_employees values (3, 'Michael Brown', 2);
insert into job_employees values (4, 'Emily Johnson', 2);
insert into job_employees values (5, 'William Lee', 3);
insert into job_employees values (6, 'Jessica Clark', 3);
insert into job_employees values (7, 'Christopher Harris', 3);
insert into job_employees values (8, 'Olivia Wilson', 3);
insert into job_employees values (9, 'Daniel Martinez', 3);
insert into job_employees values (10, 'Sophia Miller', 3);
#SQL #SQLInterviewQuestionsandanswers #sqlInterviewQuestions #ITJunction4All

Пікірлер: 5
@arjunkandoth2580
@arjunkandoth2580 3 ай бұрын
🔥🔥🔥
@ItJunction4all
@ItJunction4all 3 ай бұрын
Thanks Arjun for liking the video !
@mohdhammadkhan5570
@mohdhammadkhan5570 3 ай бұрын
sir your playlist is amazing
@ItJunction4all
@ItJunction4all 3 ай бұрын
Thank you so much 😍
@vijay.s-ll1yq
@vijay.s-ll1yq 2 ай бұрын
with calculations as (select id,title,groups,levels,payscale,totalpost,1 as rnk from job_positions union all select id,title,groups,levels,payscale,totalpost,rnk+1 from calculations where rnk+1
Basics of Creating Attribute Rules in ArcGIS Pro
15:54
Husam Jubeh
Рет қаралды 5
Пробую самое сладкое вещество во Вселенной
00:41
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 17 МЛН
Crack the Top 25 SQL Interview Questions - KSR Data Vizon
32:47
KSR Datavizon
Рет қаралды 196 М.
SQL "difference between" interview questions (part 2)
7:15
Crack Concepts
Рет қаралды 217 М.
YOTAPHONE 2 - СПУСТЯ 10 ЛЕТ
15:13
ЗЕ МАККЕРС
Рет қаралды 177 М.
В России ускорили интернет в 1000 раз
0:18
Короче, новости
Рет қаралды 1,8 МЛН