1. Write an SQL query to fetch “FIRST_NAME” from Worker table using the alias name as <WORKER_NAME>.
Q-2. Write an SQL query to fetch “FIRST_NAME” from Worker table in upper case.
Q-3. Write an SQL query to fetch unique values of DEPARTMENT from Worker table.
Q-4. Write an SQL query to print the first three characters of FIRST_NAME from Worker table.
Q-5. Write an SQL query to find the position of the alphabet (‘a’) in the first name column ‘Amitabh’ from Worker table.
Q-6. Write an SQL query to print the FIRST_NAME from Worker table after removing white spaces from the right side.
Q-7. Write an SQL query to print the DEPARTMENT from Worker table after removing white spaces from the left side.
Q-8. Write an SQL query that fetches the unique values of DEPARTMENT from Worker table and prints its length.
Q-9. Write an SQL query to print the FIRST_NAME from Worker table after replacing ‘a’ with ‘A’.
Q-10. Write an SQL query to print the FIRST_NAME and LAST_NAME from Worker table into a single column COMPLETE_NAME. A space char should separate them.
Q-11. Write an SQL query to print all Worker details from the Worker table order by FIRST_NAME Ascending.
Q-12. Write an SQL query to print all Worker details from the Worker table order by FIRST_NAME Ascending and DEPARTMENT Descending.
Q-13. Write an SQL query to print details for Workers with the first name as “Vipul” and “Satish” from Worker table.
Q-14. Write an SQL query to print details of workers excluding first names, “Vipul” and “Satish” from Worker table.
SQL related channels:
Channel for SQL learning:
@sql_res
Chennal for SQL syntax:
@sql_syntax
Chennal for SQL interview questions:
@etl_sql_interview
Channel for SQL learning:
@sql_res
Chennal for SQL syntax:
@sql_syntax
Chennal for SQL interview questions:
@etl_sql_interview
Wish you all blissful and prosperous Happy New Year
🥳🥳🥳
I found this video as very helpful, for streamlining my goals and habits and how to achieve them.
Hope it helps you too.. 😊
Watch here 👇
https://youtu.be/PZ7lDrwYdZc
🥳🥳🥳
I found this video as very helpful, for streamlining my goals and habits and how to achieve them.
Hope it helps you too.. 😊
Watch here 👇
https://youtu.be/PZ7lDrwYdZc
Click below link to Refer three Tables here for writing queries👇
https://t.me/etl_sql_interview/8
Q-15. Write an SQL query to print details of Workers with DEPARTMENT name as “Admin”.
Q-16. Write an SQL query to print details of the Workers whose FIRST_NAME contains ‘a’.
Q-17. Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘i’.
Q-18. Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘h’ and contains six alphabets.
Q-19. Write an SQL query to print details of the Workers whose SALARY lies between 100000 and 500000.
Q-20. Write an SQL query to print details of the Workers who have joined in Feb’2014.
For Answers 🤔 click here👇😁
https://t.me/etl_sql_interview/32
https://t.me/etl_sql_interview/8
Q-15. Write an SQL query to print details of Workers with DEPARTMENT name as “Admin”.
Q-16. Write an SQL query to print details of the Workers whose FIRST_NAME contains ‘a’.
Q-17. Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘i’.
Q-18. Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘h’ and contains six alphabets.
Q-19. Write an SQL query to print details of the Workers whose SALARY lies between 100000 and 500000.
Q-20. Write an SQL query to print details of the Workers who have joined in Feb’2014.
For Answers 🤔 click here👇😁
https://t.me/etl_sql_interview/32
Click below link to Refer three Tables here for writing queries👇
https://t.me/etl_sql_interview/8
Answer:
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;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
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
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.
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.