Загрузка страницы

SQL Query Interview Questions

Video talks about
SQL Query Interview Questions
SQL Interview Questions
SQL Interview Questions and answers
top sql questions
SQL real time scenario based interview questions
Top SQL Interview Questions and answers
Step by step SQL Training videos
SQL Tutorial

More videos at
https://www.youtube.com/channel/UCgWvQ6cBxZwABl_hL48ayXg
MSBI Opportunities/Jobs and Packages

Please watch and subscribe for more videos..
#SQLMSBI

https://www.youtube.com/watch?v=LqRMNAJUGPQ

********************************
Top Procedure Interview questions in SQL Server?????

Please watch and subscribe for more videos.....

https://www.youtube.com/watch?v=ZTSw89A1ZUg
sample Code :

--A. Select highest salary from employee table

SELECT MAX(SAL) AS 'Max Salary' , MIN(Sal) AS 'Min Salary' FROM EMP

-- B. Get the employee details who has highest salary

SELECT * FROM EMP WHERE SAL=(SELECT MAX(SAL) FROM EMP)

-- C. Get the second highest salary from employee table

SELECT TOP 1 EMPName,SAL FROM (
SELECT TOP 2 EMPName,SAL FROM EMP ORDER BY SAL DESC) SUB ORDER BY SAL ASC

-- D. Get the employees list who has the salary between x and y.

SELECT * FROM EMP WHERE SAL Between 9000 and 13000

-- E. Get the highest salary on department wise

SELECT DeptName,MAX(SAL) AS 'MAX SAL' FROM EMP E JOIN DEPT D ON E.DeptNo=D.DeptNo GROUP BY DeptName

-- F. Get the highest salary, employee name along with department

SELECT E.EmpName,SUB.DeptName,SUB.[Max Sal] FROM EMP E JOIN
(
SELECT E.DeptNo, DeptName,MAX(SAL) AS 'Max Sal'
FROM EMP E JOIN DEPT D ON E.DeptNo=D.DeptNo GROUP BY DeptName,E.DeptNo) SUB
ON E.DeptNo=SUB.DeptNo AND E.Sal=SUB.[Max Sal]

Видео SQL Query Interview Questions канала Training2SQL MSBI
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
6 января 2018 г. 16:14:48
00:19:06
Яндекс.Метрика