SQL Questions
← Question BankSign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark
SQL & Computer Science
SQL Questions
Interview questions on SQL Questions.
47 questions
Sign in to bookmark
SQL Questions
Q2. How can you convert the first name from the Worker table to uppercase?
SQL Questions
Q3. What SQL query would you use to fetch distinct department names from the Worker table?
SQL Questions
Q4. How can you select the first three characters of the first name from the Worker table?
SQL Questions
Q5. Write a query to find the position of 's' in the first name "Manish" within the Worker table.
SQL Questions
Q6. How do you trim whitespace from the right side of the first name in the Worker table?
SQL Questions
Q7. Write a query to remove whitespace from the left side of the department field in the Worker table.
SQL Questions
Q8. How can you fetch unique department names from the Worker table and display their lengths?
SQL Questions
Q9. What query would replace 'a' with 'A' in the first name from the Worker table?
SQL Questions
Q10. How do you concatenate the first name and last name from the Worker table into a single column "COMPLETE NAME"?
SQL Questions
Q11. Write a query to list all worker details from the Worker table ordered by first name in ascending order.
SQL Questions
Q12. How can you list all worker details from the Worker table ordered by first name ascending and department descending?
SQL Questions
Q13. Write a query to fetch details for Workers with the first names "
Manish" and "Arhan" from the Worker table.
SQL Questions
Q14. Write a query to list details of workers excluding first names "Manish" and "Arhan" from the Worker table.
SQL Questions
Q15. Write a query to fetch details of Workers with the department name "Admin".
SQL Questions
Q16. Write a query to fetch details of Workers whose first name contains 'a'.
SQL Questions
Q17. Write a query to fetch details of Workers whose first name ends with 'a'.
SQL Questions
Q18. Write a query to fetch details of Workers whose first name ends with 'h' and contains six alphabets.
SQL Questions
Q19. Write a query to fetch details of Workers whose salary lies between 100000 and 500000.
SQL Questions
Q20. Write a query to list Workers who joined in February 2014.
SQL Questions
Q21. Write a query to fetch the count of employees working in the department 'Admin'.
SQL Questions
Q22. Write a query to fetch worker names with salaries between 50000 and 100000.
SQL Questions
Q23. Write a query to fetch the number of workers for each department in descending order.
SQL Questions
Q24. Write a query to list details of Workers who are also Managers, assuming a title table contains info about worker titles.
SQL Questions
Q25. Write a query to count the number of titles in the organization of different types.
SQL Questions
Q26. Write a query to show only odd rows from the Worker table.
SQL Questions
Q27. Write a query to show only even rows from the Worker table.
SQL Questions
Q28. Write a query to clone a new table from another table (e.g., worker_clone from worker).
SQL Questions
Q29. Write a query to fetch intersecting records of two tables (worker and worker_clone).
SQL Questions
Q30. Write a query to show records from one table that another table does not have.
SQL Questions
Q31. Write a query to show the current date and time.
SQL Questions
Q32. Write a query to show the topn (e.g., 5) records of a table ordered by descending salary.
SQL Questions
Q33. Write a query to determine the nth (e.g., 5th) highest salary from a table.
SQL Questions
Q34. Write a query to find the 5th highest salary without using the LIMIT keyword.
SQL Questions
Q35. Write a query to list employees with the same salary.
SQL Questions
Q36. Write a query to show the second highest salary from a table using a sub-query.
SQL Questions
Q37. Write a query to show one row twice in results from a table.
SQL Questions
Q38. Write a query to list worker ids who do not receive a bonus.
SQL Questions
Q39. Write a query to fetch the first 50% records from a table.
SQL Questions
Q40. Write a query to fetch the departments that have less than 4 people in them.
SQL Questions
Q41. Write a query to show all departments along with the number of people in there.
SQL Questions
Q42. Write a query to show the last record from a table.
SQL Questions
Q43. Write a query to fetch the first row of a table.
SQL Questions
Q44. Write a query to fetch the last five records from a table.
SQL Questions
Q45. Write a query to print the names of employees having the highest salary in each department.
SQL Questions
Q46. Write a query to fetch three max salaries from a table using a co-related subquery.
SQL Questions