To Refer three tables for writing queries👇
https://t.me/etl_sql_interview/8
To Refer questions for writing queries👇
https://t.me/etl_sql_interview/37
Answ
https://t.me/etl_sql_interview/8
To Refer questions for writing queries👇
https://t.me/etl_sql_interview/37
Answ
ers :
31. SELECT SYSDATE FROM DUAL;
32. SELECT * FROM (SELECT * FROM Worker ORDER BY Salary DESC)
WHERE ROWNUM <= 10;
33. SELECT Salary FROM Worker ORDER BY Salary DESC LIMIT n-1,1;
34. SELECT Salary
FROM Worker W1
WHERE 4 = (
SELECT COUNT( DISTINCT ( W2.Salary ) )
FROM Worker W2
WHERE W2.Salary >= W1.Salary
);
35. Select distinct W.WORKER_ID, W.FIRST_NAME, W.Salary
from Worker W, Worker W1
where W.Salary = W1.Salary
and W.WORKER_ID != W1.WORKER_ID;SQL Interview Questions pinned «SQL related channels: Channel for SQL learning: @sql_res Chennal for SQL syntax: @sql_syntax Chennal for SQL interview questions: @etl_sql_interview»
Click below link to Refer three tables here for writing queries 👇
https://t.me/etl_sql_interview/8
Q-36. Write an SQL query to show the second highest salary from a table.
Q-37. Write an SQL query to show one row twice in results from a table.
Q-38. Write an SQL query to fetch intersecting records of two tables.
Q-39. Write an SQL query to fetch the first 50% records from a table.
Q-40. Write an SQL query to fetch the departments that have less than five people in it.
https://t.me/etl_sql_interview/8
Q-36. Write an SQL query to show the second highest salary from a table.
Q-37. Write an SQL query to show one row twice in results from a table.
Q-38. Write an SQL query to fetch intersecting records of two tables.
Q-39. Write an SQL query to fetch the first 50% records from a table.
Q-40. Write an SQL query to fetch the departments that have less than five people in it.
To Refer three tables for writing queries👇
https://t.me/etl_sql_interview/8
To Refer questions for writing queries👇
https://t.me/etl_sql_interview/41
https://t.me/etl_sql_interview/8
To Refer questions for writing queries👇
https://t.me/etl_sql_interview/41
Answers :
36. Select max(Salary) from Worker
where Salary not in (Select max(Salary) from Worker);
37. select FIRST_NAME, DEPARTMENT from worker W where W.DEPARTMENT='HR'
union all
select FIRST_NAME, DEPARTMENT from Worker W1 where W1.DEPARTMENT='HR';
38. (SELECT * FROM Worker)
INTERSECT
(SELECT * FROM WorkerClone);
39.SELECT *
FROM WORKER
WHERE WORKER_ID <= (SELECT count(WORKER_ID)/2 from Worker);
40. SELECT DEPARTMENT, COUNT(WORKER_ID) as 'Number of Workers' FROM Worker GROUP BY DEPARTMENT HAVING COUNT(WORKER_ID) < 5;Click below link to Refer three tables here for writing queries 👇
https://t.me/etl_sql_interview/8
Q-41. Write an SQL query to show all departments along with the number of people in there.
Q-42. Write an SQL query to show the last record from a table.
Q-43. Write an SQL query to fetch the first row of a table.
Q-44. Write an SQL query to fetch the last five records from a table.
Q-45. Write an SQL query to print the name of employees having the highest salary in each department.
https://t.me/etl_sql_interview/8
Q-41. Write an SQL query to show all departments along with the number of people in there.
Q-42. Write an SQL query to show the last record from a table.
Q-43. Write an SQL query to fetch the first row of a table.
Q-44. Write an SQL query to fetch the last five records from a table.
Q-45. Write an SQL query to print the name of employees having the highest salary in each department.
To Refer three tables for writing queries👇
https://t.me/etl_sql_interview/8
To Refer questions for writing queries👇
https://t.me/etl_sql_interview/43
https://t.me/etl_sql_interview/8
To Refer questions for writing queries👇
https://t.me/etl_sql_interview/43
Answers :
41. SELECT DEPARTMENT, COUNT(DEPARTMENT) as 'Number of Workers' FROM Worker GROUP BY DEPARTMENT;
42. Select * from Worker where WORKER_ID = (SELECT max(WORKER_ID) from Worker);
43. Select * from Worker where WORKER_ID = (SELECT min(WORKER_ID) from Worker);
44. SELECT * FROM Worker WHERE WORKER_ID <=5
UNION
SELECT * FROM (SELECT * FROM Worker W order by W.WORKER_ID DESC) AS W1 WHERE W1.WORKER_ID <=5;
45. SELECT t.DEPARTMENT,t.FIRST_NAME,t.Salary from(SELECT max(Salary) as TotalSalary,DEPARTMENT from Worker group by DEPARTMENT) as TempNew
Inner Join Worker t on TempNew.DEPARTMENT=t.DEPARTMENT
and TempNew.TotalSalary=t.Salary;SQL Interview Questions
Basic Level : https://intellipaat.com/blog/interview-question/sql-interview-questions/#11
Intermediate Level :
https://intellipaat.com/blog/interview-question/sql-interview-questions/#12
Advance Level :
https://intellipaat.com/blog/interview-question/sql-interview-questions/#13
Basic Level : https://intellipaat.com/blog/interview-question/sql-interview-questions/#11
Intermediate Level :
https://intellipaat.com/blog/interview-question/sql-interview-questions/#12
Advance Level :
https://intellipaat.com/blog/interview-question/sql-interview-questions/#13
Commonly asked questions - yet many of us fell short to clearly explain in interview
Difference between concepts which looks similar but they aren't ( eg: where vs having, Exists vs In.. etc )
Part 1 :
https://youtu.be/RZc4QSRRk98
Part 2 :
https://youtu.be/s1QkS4PfiFg
Difference between concepts which looks similar but they aren't ( eg: where vs having, Exists vs In.. etc )
Part 1 :
https://youtu.be/RZc4QSRRk98
Part 2 :
https://youtu.be/s1QkS4PfiFg
Leetcode SQL
Bit faster explanation
https://youtube.com/playlist?list=PLdrw9_aIADIPAMJW8I_S-S747oyiRtzpS
Detailed Explanation
https://youtube.com/playlist?list=PLtfxzVLWb-B-O3VAjxsoZYgG6d8WMnPjG
Bit faster explanation
https://youtube.com/playlist?list=PLdrw9_aIADIPAMJW8I_S-S747oyiRtzpS
Detailed Explanation
https://youtube.com/playlist?list=PLtfxzVLWb-B-O3VAjxsoZYgG6d8WMnPjG
SQL Interview Questions
Photo
YouTube
Top 5 Udemy Courses to Learn AWS Cloud (For Beginners)
In this video, I walk through the top 5 Udemy Courses I recommend for learning AWS Cloud. These courses have helped me so much on my cloud learning journey, so I want to shared them with you. Links below! 👇
▬▬▬▬ Timestamps ▬▬▬▬
0:00 Introduction
1:52 Course…
▬▬▬▬ Timestamps ▬▬▬▬
0:00 Introduction
1:52 Course…