Question: Write SQL queries to solve the following problems. We will be using the university database. All queries should involve only the instructor table. After you

Write SQL queries to solve the following problems. We will be using the university database. All queries should involve only the instructor table. After you are done, save your work as .sql file and turn in the .sql file into Moodle for grading.
Write a SQL statement to display all columns using the SQL asterisk (*) wild-card character.
Write a SQL statement to display ID and name of the instructors (ID appears first).
Write a SQL statement to display department names.
Write a SQL statement to display unique department names. (expect 7 rows returned)
Write a SQL statement to display all info about instructors having a salary greater than 75000.(expect 6 rows returned)
Write a SQL statement to display department name, instructor name, and salary for instructors that have a salary less than 70000. Sort the results in ascending order by department name. (expect 4 rows returned)
Write a SQL statement to display name, department name, and salary for instructors that have a salary less than 90000 and are in the department of History. Sort the results in ascending order by department name and in descending order by salary. (expect 2 rows returned)
Write an SQL statement to display ID, name, and salary for all instructors having a salary greater than 61000 and less than 80000.(expect 4 rows returned)
Write a SQL statement to show everything for all instructor with an ID starting with 76.(expect 2 rows returned) Note: The ID field of the instructor table is a varchar type instead of int to make this query valid.
Write a SQL statement to show ID and name for all instructors with a department name that includes the word Sci.(expect 3 rows returned)
Write a SQL statement to show ID and name for all instructors with an a in the second position from the left in their names. (expect 2 rows returned)
Format

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!