Overview
Welcome to your first day at the Precision Plane Parts accounts payable department! Our company is dedicated to helping the aerospace industry build the safest aircraft possible by providing and delivering high quality equipment. Your role here is to help us in that endeavor by maintaining our expenditures database so we can continue to maintain our inventory and continue to keep good relationships with our vendors. For your first day, you are tasked with getting familiar with our main database. Download the attached Access database and get started!
Instructions
Run each of the queries below and save your results as separate queries in Access. To create a new query, first click the βQuery Designβ button in the Create pane in Access. From here, switch the view to the SQL view by selecting the βSQLβ view button in the top left or bottom right corner of the page. To save your query, simply hit βctrl + sβ to open a dialog box asking you to name your query. This will save each of your queries next to the tables in your database.
Who are the employees that work with us? Write a query displaying all columns from the Employee table.
a. Select all the columns from the Employee table
Who are the vendors that buy from us, and how do we contact them? Write a query displaying the vendor id, company name, and company phone number from the Vendor table.
a. Select the vendor_id, company_name, and phone_number columns from the Vendor table.
How frequently do we sell our inventory items? Write a query showing the inventory name and standard expenditure frequency for each item in the Inventory table.
a. Select the inventory_name and std_expenditure_freq columns from the Inventory table.
b. Rename the std_expenditure_freq column to order_frequency
What types of roles do our employees have? Write a query showing the list of employee roles in our Accounts Payable department.
a. Select the emp_role_description column from the EmployeeRole table.
Time to Complete: 10 minutes
Difficulty: Easy
Solution: See Below
1:
SELECT *
FROM Employee;
2:
SELECT vendor_id, company_name, phone_number
FROM Vendor;
3:
SELECT inventory_name, std_expenditure_freq AS order_frequency
FROM Inventory;
4:
SELECT emp_role_description
FROM EmployeeRole;
Time to Complete: 10 minutes
Difficulty: Easy
Solution:
1:
SELECT *
FROM Employee;
2:
SELECT vendor_id, company_name, phone_number
FROM Vendor;
3:
SELECT inventory_name, std_expenditure_freq AS order_frequency
FROM Inventory;
4:
SELECT emp_role_description
FROM EmployeeRole;
Time to Complete: 10 minutes
Difficulty: Easy
Solution: See Below
Q1
SELECT *
FROM Employee;
Q2
SELECT vendor_id, company_name, phone_number
FROM Vendor;
Q3
SELECT inventory_name, std_expenditure_freq AS order_frequency
FROM Inventory;
Q4
SELECT emp_role_description
FROM EmployeeRole;
Time to complete: 10 Minutes
Difficulty: Easy
Solution:
Q1:
SELECT *
FROM Employee;
Q2:
SELECT vendor_id, company_name, phone_number
FROM Vendor;
Q3:
SELECT inventory_name, std_expenditure_freq AS order_frequency
FROM Inventory;
Q4:
SELECT emp_role_description
FROM EmployeeRole;
Time to complete: 10 Minutes
Difficulty: Easy
Solution:
1.
SELECT *
FROM Employee
2.
SELECT v.vendor_id, v.company_name, v.phone_number
FROM vendor as v
3.
SELECT i.inventory_name, i.std_expenditure_freq AS order_frequency
FROM inventory AS i
4.
SELECT emp_role_description
FROM EmployeeRole
Time to Complete: 10 minutes
Difficulty: Easy
Solution: See Below
1: SELECT *
from employee;
2: SELECT vendor_id, company_name, phone_number
from Vendor;
3: SELECT inventory_name, std_expenditure_freq as Order_Frequency
from Inventory;
4: SELECT emp_role_description
from EmployeeRole