40 likes | 137 Views
SQL Exercises. Some Queries. All information for all students Name and ID for all students Dept name and title for all courses Instructor name and salary after a 10% raise call this computer value New Salary Dept name and course title for all courses in a new col called CourseCode
E N D
Some Queries • All information for all students • Name and ID for all students • Dept name and title for all courses • Instructor name and salary after a 10% raise call this computer value New Salary • Dept name and course title for all courses in a new col called CourseCode • Id and Start and end times for all timeslots
The total salary of all instructors • The maximum, minimum and average budget of all departments with the ave rounded to whole dollars • Get the first three characters of each department name • Get the last three characters of each student name • Make a code for each course that consists of the first three characters of the dept name and the first three characters of the course title
Sort the students by name • Sort the instructors by name within department • Sort the students in descending order base on credit hours • List students but print FR, SO, JR, or SR instead of the number of credits • List the classroom info but replace the name Watson with Jones • Select all students majoring in Comp. Sci. • Select the three instructors with the highest salaries • Select students in Comp. Sci. or History • Select students in Comp. Sci. or History but