Question:
Refer to Figure and Table to write the query logic needed to answer the following questions. (Optional: If requested by your instructor, write your queries in SQL or a Query-By-Example graphical interface.) Some answers may require more than one query—try to write the most efficient queries possible.
a. Accounts payable for all suppliers in Arizona
b. Total amount of sales to a customer named Smith
c. Total wage expense
d. Total wages payable
e. Net increase (decrease) in quantity-on-hand for a particular inventory item
f. The proportion of sales made to walk-in customers (i.e., no order)
g. The salesperson who made the largest amount of sales in October
h. The salesperson who made the most sales in October
i. The most popular item, in terms of total units sold
Continue to nextpage
Accounts Payable
Accounts payable (AP) are bills to be paid as part of the normal course of business.This is a standard accounting term, one of the most common liabilities, which normally appears in the balance sheet listing of liabilities. Businesses receive...
Transcribed Image Text:
TABLE 18-1 Table Names and Attribute Placement for Figure 18-4 ATTRIBUTES FOREIGN KEYS Supplier number, employee Supplier number, employee TABLES PRIMARY KEY OTHER ATTRIBUTES Date, time, reason Date, time, remarks, vendor invoice Order Inventory Purchase order number number Receive Inventory Receiving report number number, purchase order number, check number number Disburse Cash Check number Supplier number, employee Amount, description, date number (payee), employee number (signer), account number Take Customer Order Sales Receive Cash Sales order number Customer number, employee Date, time, special remarks Customer number, employee Date, time, invoice sent (Y/N) Customer number, employee Date, time, method of payment Employee number, supervisor Date, time in, time out number Invoice number Remittance number Timecard number Product number number, sales order number number, account number Time Worked number, paycheck number Inventory Description, list price, standard cost, beginning quantity-on-hand, beginning quantity-available, reorder quantity, Cash Employees reorder point Beginning-balance, type of account Name, date hired, date of birth Account number Employee number Customer number pay rate Name, address," beginning account balance, credit limit Name, address," beginning account Suppliers Supplier number balance, performance rating Order Inventory Purchase order number product number product number product number Quantity ordered, actual unit cost Quantity received, condition Quantity ordered Quantity sold, actual sale price Amount applied to invoice Inventory Receive InventoryReceiving report number Inventory Take Customer Sales order number Invoice number, product Invoice number Order-Inventory Sales-Inventory number Sales-Receive Cash remittance number