0% found this document useful (0 votes)
9 views3 pages

SQL Questions

Uploaded by

umangsales0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

SQL Questions

Uploaded by

umangsales0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Refer to the FacultyMembers and Courses tables, and write the following queries.

1. List the details of all faculty members.


2. List the details of all courses.
3. List the courses taught by a specific faculty member (e.g., 'Amit Kumar').
4. Find the faculty member who teaches a specific course (e.g., 'Introduction to Computer
Science').
5. List the faculty members in the 'Computer Science' department.
6. List the courses in the 'Physics' department.
7. Find the faculty members who have 'Machine Learning' in their research interests.
8. List the courses with a start date after '2023-02-01'.
9. Find the course with the highest number of credits.
10. List the faculty members who are not currently active.
11. List the courses with descriptions containing the word 'principles'.
12. Find the faculty members who teach courses with more than 3 credits.
13. List the courses taught by faculty members with a 'Ph.D.' academic degree.
14. Find the faculty members who are tenured.
15. List the faculty members with more than 5 years of experience.
16. Update the phone number of 'Amit Kumar' to '987-654-3210'.
17. Add a new course with the following details: 'Database Management', '1', 'Computer
Science', 'DB101', '2023-03-01', '2023-06-01', 'C302', '3.5', 'Introduction to database
management.'.
18. Change the department of 'Priya Sharma' to 'Computer Science'.
19. Delete the course with course code 'CHEM201'.
20. Mark 'Rahul Yadav' as not currently active.
21. Add 2 years of experience to all faculty members.
22. Remove the academic degree of 'Rajesh Patel'.
23. Add a new faculty member named 'Sandeep Gupta' with relevant details.
24. Update the course room number for 'Introduction to Computer Science' to 'C302'.
25. Change the description of 'Physics 101' to 'Fundamental principles of physics and
electromagnetism.'.
26. Calculate the average years of experience for all faculty members.
27. Find the faculty member with the highest years of experience.
28. Count the number of courses in each department.
29. Calculate the total number of credits offered by all courses.
30. Determine the number of faculty members in each department.
31. Calculate the average number of credits for all courses.
32. Find the faculty member with the most research interests.
33. Count the number of full-time and part-time faculty members.
34. Calculate the total number of credits offered by the 'Computer Science' department.
35. Determine the department with the highest average years of experience.
36. List the names of faculty members and the courses they teach.
37. Find the faculty members who teach more than one course.
38. List the courses and their faculty members' last names.
39. Find the faculty members who teach courses with more than 4 credits.
40. List the courses, their faculty members, and the department in which they teach.
41. Find the faculty members who teach courses with start dates in 2023.
42. List the courses and their faculty members who are tenured.
43. Find the faculty members who teach in the same department as 'Amit Kumar'.
44. List the courses taught by faculty members with 'Physics' in their research interests.
45. Find the faculty members who have the same first name as any course name.
46. Find the faculty members who teach courses with the highest number of credits.
47. List the courses and their faculty members who are not currently active.
48. Find the courses with start dates later than the latest hire date of faculty members.
49. List the courses with descriptions longer than the average description length.
50. Find the faculty members who teach courses with the earliest start date.
51. List the courses and their faculty members who teach courses in the 'Computer Science'
department.
52. Find the faculty members who have the same department as 'Physics 101'.
53. List the courses and their faculty members who teach in departments with more than 3
faculty members.
54. Find the faculty members who teach courses with credits greater than the average credits.
55. List the courses and their faculty members who teach courses with descriptions containing
'electromagnetism'.
56. List the faculty members whose first names contain the letter 'a' and last names contain the
letter 's'.
57. Find the courses whose names start with the word 'Introduction.'
58. List the faculty members who have an email address with the domain 'example.com'.
59. Find the courses with descriptions containing the phrase 'advanced topics.'
60. List the faculty members and their email addresses in all uppercase.
61. Find the courses with course codes that end with '101'.
62. List the faculty members whose last names are exactly four characters long.
63. Find the courses with names that do not contain the word 'Advanced.'
64. List the faculty members and their phone numbers without dashes.
65. Find the courses with descriptions longer than 100 characters
66. Retrieve the faculty members' full names by concatenating their first name and last name
with a space in between.
67. Find the courses that have the word 'Science' located within their descriptions.
68. List the first 5 characters of the course names.
69. Get the last 3 characters of the course codes.
70. Display the course names reversed (e.g., 'Computer Science' should appear as 'ecneicS
retupmoC').
71. Replace the word 'Advanced' in course names with 'Intermediate.'
72. Compare the faculty members' first names with the string 'John' and retrieve faculty
members with names that are greater (alphabetically) than 'John'.
73. Find courses with descriptions containing 'math' and replace it with 'mathematics.'
74. Retrieve the current date and time.
75. List the faculty members and their hire dates.
76. Find the courses that have already started (based on the current date).
77. Calculate the duration (in days) of each course by subtracting the start date from the end
date.
78. Display the day of the week for the start date of each course.
79. List the faculty members and their years of experience.
80. Calculate the difference in years between the current date and each faculty member's hire
date to determine their years of service.
81. Find the courses that have a start date in the future (after the current date).
82. Calculate the average duration (in days) of all courses.
83. Determine the day of the week for the current date.
84. Retrieve the courses and their start dates sorted in ascending order.
85. List the faculty members and their ages based on their birthdates.
86. Find the courses taught by faculty members with more than 10 years of experience.
87. Calculate the total number of days between the start date of the course 'Physics 101' and the
end date of the course 'Chemistry 101.'
88. Retrieve the courses that have their start dates on a Monday.
89. Calculate the average years of experience for faculty members who are tenured.
90. List the faculty members and the number of years remaining until their retirement (assuming
retirement at age 65).
91. List all faculty members and their research interests as a comma-separated list.
92. Display the courses taught by each faculty member as a comma-separated list.
93. List all course codes within each department as a comma-separated list.
94. Show all research interests of faculty members in the 'Computer Science' department as a
comma-separated list.
95. Display the course descriptions for each faculty member's courses as a comma-separated list.
96. List the start dates of courses for each department as a comma-separated list.
97. Show the full-time or part-time status of faculty members along with their course names as a
comma-separated list.
98. List the course names taught by faculty members with 'Ph.D.' degrees as a comma-separated
list.
99. Show all faculty members and their respective department's course codes as a comma-
separated list.
100. List the departments along with the tenure status of faculty members in each
department as a comma-separated list.

You might also like