Subject: SQL Query Formulation Definition You are given a sample MS Access Unive
ID: 3604156 • Letter: S
Question
Subject: SQL Query Formulation Definition You are given a sample MS Access University database (University.accdb) with tables populated with sample data. The database file can be downloaded from our Blackboard course shell. Do the followings to complete this assignment: Formulate the below queries in SQL View in MS Access,
Just write the query code.
4. Formulate a SQL query in SQL View to find the total amount of salary paid to the Associate Professors?
5. Formulate a SQL query in SQL View to list the students whose names start with “C” and who are from Seattle.
Explanation / Answer
Given the above table structure,
Answer to Question 4)
There is no sample data and thus cannot determine this query. Also there is no Salary Column in any of the tables.
Let column to be Salary and post to be 'Associate Professor', then,
select sum(Salary) from FacultyTable where post='Associate Professor';
Answer to Question 5)
Considering we are matching the First Name of the Student,
select * from Student where stdFirstName like 'C%' and where stdCity='Seattle';