ch
Feedback
SQL Interview Questions

SQL Interview Questions

前往频道在 Telegram

Channel for SQL learning: @sql_res Chennal for SQL syntax: @sql_syntax Chennal for SQL interview questions: @etl_sql_interview

显示更多
未指定国家未指定类别
952
订阅者
+124 小时
+97 天
+7730 天

数据加载中...

标签云
无数据
有任何问题?请刷新页面或联系我们的客服
进出提及
---
---
---
---
---
---
吸引订阅者
十二月 '24
十二月 '24
+76
在0个频道中
十一月 '24
+58
在0个频道中
Get PRO
十月 '24
+76
在0个频道中
Get PRO
九月 '24
+86
在0个频道中
Get PRO
八月 '24
+365
在0个频道中
Get PRO
七月 '240
在0个频道中
Get PRO
六月 '240
在0个频道中
Get PRO
五月 '240
在0个频道中
Get PRO
四月 '240
在0个频道中
Get PRO
三月 '24
+35
在0个频道中
Get PRO
二月 '24
+634
在0个频道中
Get PRO
一月 '240
在0个频道中
Get PRO
十二月 '230
在0个频道中
Get PRO
十一月 '230
在0个频道中
Get PRO
十月 '230
在0个频道中
Get PRO
九月 '230
在0个频道中
Get PRO
八月 '230
在0个频道中
Get PRO
七月 '230
在0个频道中
Get PRO
六月 '230
在0个频道中
Get PRO
五月 '230
在0个频道中
Get PRO
四月 '230
在0个频道中
Get PRO
三月 '23
+107
在0个频道中
Get PRO
二月 '23
+135
在0个频道中
Get PRO
一月 '23
+121
在0个频道中
Get PRO
十二月 '22
+60
在0个频道中
Get PRO
十一月 '22
+61
在0个频道中
Get PRO
十月 '22
+52
在0个频道中
Get PRO
九月 '22
+67
在0个频道中
Get PRO
八月 '22
+139
在0个频道中
Get PRO
七月 '22
+258
在0个频道中
日期
订阅者增长
提及
频道
21 十二月+5
20 十二月+2
19 十二月+4
18 十二月+9
17 十二月+9
16 十二月+4
15 十二月0
14 十二月+3
13 十二月+1
12 十二月+11
11 十二月+1
10 十二月+3
09 十二月+2
08 十二月+3
07 十二月+5
06 十二月+1
05 十二月+4
04 十二月+1
03 十二月+3
02 十二月+3
01 十二月+2
频道帖子
2
SQL interview queries - BIG 4 https://youtu.be/dWHSt0BVlv0
196
3
Tricky SQL interview questions https://youtu.be/aE623ff7zkM
236
4
Commonly asked questions - 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
518
5
Top 10 SQL interview queries for experienced https://youtu.be/zvuWEysWoLE
252
6
Top 25 SQL interview Questions https://youtu.be/AK7_m-aThfw
697
7
https://www.kdnuggets.com/2020/11/5-tricky-sql-queries-solved.html
865
8
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 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;
915
9
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.
853
10
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 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;
745
11
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.
609
12
Most commonly asked SQL interview questions https://youtu.be/L-URbfgxBMQ
592
13
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 Answers : 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;
620
14
Click below link to Refer three tables here for writing queries 👇 https://t.me/etl_sql_interview/8 Q-31. Write an SQL query to show the current date and time. Q-32. Write an SQL query to show the top n (say 10) records of a table. Q-33. Write an SQL query to determine the nth (say n=5) highest salary from a table. Q-34. Write an SQL query to determine the 5th highest salary without using TOP or limit method. Q-35. Write an SQL query to fetch the list of employees with the same salary.
564
15
covers many interesting interview questions checkout This playlist 👇 https://youtube.com/playlist?list=PLdrw9_aIADIPAMJW8I_S-S747oyiRtzpS Tip: Try to do just one per day ( If possible two/day on weekends )
528
16
Click below links 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/34 Answers: 26. SELECT * FROM Worker WHERE MOD (WORKER_ID, 2) <> 0; 27. SELECT * FROM Worker WHERE MOD (WORKER_ID, 2) = 0; 28. SELECT * INTO WorkerClone FROM Worker; 29. (SELECT * FROM Worker) INTERSECT (SELECT * FROM WorkerClone); 30. SELECT * FROM Worker MINUS SELECT * FROM Title;
554
17
Click below link to Refer three tables here for writing queries👇 https://t.me/etl_sql_interview/8 Q-26. Write an SQL query to show only odd rows from a table. Q-27. Write an SQL query to show only even rows from a table. Q-28. Write an SQL query to clone a new table from another table. Q-29. Write an SQL query to fetch intersecting records of two tables. Q-30. Write an SQL query to show records from one table that another table does not have.
526
18
Click below link to Refer three Tables here for writing queries👇 https://t.me/etl_sql_interview/8 Q-21. Write an SQL query to fetch the count of employees working in the department ‘Admin’. Q-22. Write an SQL query to fetch worker names with salaries >= 50000 and <= 100000. Q-23. Write an SQL query to fetch the no. of workers for each department in the descending order. Q-24. Write an SQL query to print details of the Workers who are also Managers. Q-25. Write an SQL query to fetch duplicate records having matching data in some fields of a table. For Answers 🤔 click here 👇 https://t.me/etl_sql_interview/32
549
19
Click below link to Refer three Tables here for writing queries👇 https://t.me/etl_sql_interview/8 Answer: 1. Select FIRST_NAME AS WORKER_NAME from Worker; 2. Select upper(FIRST_NAME) from Worker; 3. Select distinct DEPARTMENT from Worker; 4. Select substring(FIRST_NAME,1,3) from Worker; 5.Select INSTR(FIRST_NAME, BINARY'a') from Worker where FIRST_NAME = 'Amitabh'; 6.Select RTRIM(FIRST_NAME) from Worker; 7.Select LTRIM(DEPARTMENT) from Worker; 8.Select distinct length(DEPARTMENT) from Worker; 9.Select REPLACE(FIRST_NAME,'a','A') from Worker; 10.Select CONCAT(FIRST_NAME, ' ', LAST_NAME) AS 'COMPLETE_NAME' from Worker; 11.Select * from Worker order by FIRST_NAME asc; 12.Select * from Worker order by FIRST_NAME asc,DEPARTMENT desc; 13.Select * from Worker where FIRST_NAME in ('Vipul','Satish'); 14.Select * from Worker where FIRST_NAME not in ('Vipul','Satish'); 15. Select * from Worker where DEPARTMENT like 'Admin%'; 16. Select * from Worker where FIRST_NAME like '%a%'; 17. Select * from Worker where FIRST_NAME like '%i'; 18. Select * from Worker where FIRST_NAME like '_h'; 19. Select * from Worker where SALARY between 100000 and 500000; 20.Select * from Worker where year(JOINING_DATE) = 2014 and month(JOINING_DATE) = 2; 21. SELECT COUNT(*) FROM worker WHERE DEPARTMENT = 'Admin'; 22. SELECT CONCAT(FIRST_NAME, ' ', LAST_NAME) As Worker_Name, Salary FROM worker WHERE WORKER_ID IN (SELECT WORKER_ID FROM worker WHERE Salary BETWEEN 50000 AND 100000); 23. SELECT DEPARTMENT, count(WORKER_ID) No_Of_Workers FROM worker GROUP BY DEPARTMENT ORDER BY No_Of_Workers DESC; 24. SELECT DISTINCT W.FIRST_NAME, T.WORKER_TITLE FROM Worker W INNER JOIN Title T ON W.WORKER_ID = T.WORKER_REF_ID AND T.WORKER_TITLE in ('Manager'); 25. SELECT WORKER_TITLE, AFFECTED_FROM, COUNT(*) FROM Title GROUP BY WORKER_TITLE, AFFECTED_FROM HAVING COUNT(*) > 1;
537