Question: Based on the three tables and the attributes below, write SQL commands for each question to retrieve the data from the database. Required: a. What

Based on the three tables and the attributes below, write SQL commands for each question to retrieve the data from the database.Based on the three tables and the attributes below, write SQL commands

Required:

a. What are the foreign keys in the Sales table?

for each question to retrieve the data from the database. Required: a.

b. How many sales transactions were made in March, 2017?

What are the foreign keys in the Sales table? b. How many

c. Which sales transactions were made by the employee whose ID is S2038 in the system?

sales transactions were made in March, 2017? c. Which sales transactions were

d. List the inventory items with purchase price larger than $6,500.

made by the employee whose ID is S2038 in the system? d.

e. Write a query to find out the dollar amount of each sales transaction.

List the inventory items with purchase price larger than $6,500. e. Write

\begin{tabular}{|l|l|} \hline InvoicelD \\ \hline InvoiceDate \\ \hline OrderDate \\ \hline CustomerlD \\ \hline EmployeelD \\ \hline CustomerPO \\ \hline \end{tabular} \begin{tabular}{|l|l|l|l|l|l|l|} \hline SELECT & & & SUM & ([Quantity] & & ]) AS Amount \\ \hline FROM & & & & & \\ \hline WHERE & Sales & & & & \\ \hline GROUP BY & & & & \\ \hline \end{tabular} \begin{tabular}{|l|l|} \hline InvoicelD \\ \hline InvoiceDate \\ \hline OrderDate \\ \hline CustomerlD \\ \hline EmployeelD \\ \hline CustomerPO \\ \hline \end{tabular} \begin{tabular}{|l|l|l|l|l|l|l|} \hline SELECT & & & SUM & ([Quantity] & & ]) AS Amount \\ \hline FROM & & & & & \\ \hline WHERE & Sales & & & & \\ \hline GROUP BY & & & & \\ \hline \end{tabular}

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 Accounting Questions!