Question: ( 1 0 pts ) Write one query that returns in one table the following information from the tables above: Order number, Customer Name, Grade,

(10pts) Write one query that returns in one table the following information
from the tables above:
Order number, Customer Name, Grade, Date of Order, purchase amount,
Salesman, and commission. The output table should look like this the table
below. Please use Inner Joins and remember to rename the columns.
What does this query returns?
a.
(5pts) SELECT salesmanid, AVG(purchamt)
FROM orders
WHERE orddate ='2012-09-10'
GROUP BYsalesmanid;
b.(5pts)
SELECT ord_no, cust_name, commission,
FROM salesman,orders, customer
WHERE orders.customer_id = customer.customer_id
AND customer.grade IS NOT NULL;
( 1 0 pts ) Write one query that returns in one

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