Question: At Bird Company, an order is recorded in two separate tables as follows. The table titled orders contains a single record of header information for
.png)
Required
a. Write an SQL query that retrieves all of the fields for each record and all of the records from the orders table.
b. Write an SQL query that retrieves order number and vendor product number for all of the records from the order details table.
c. Write an SQL query that retrieves order number and order type for all of the records from the orders table. The query should sort the data ascending by order number. d. Write an SQL query that retrieves order number and vendor product number for records from the order details
Table, selecting only records that have a price that is greater than 20.00.
e. Write an SQL query that retrieves order number and customer number for records from the orders table, selecting only records that have fax as the order type. The query should sort the data descending by customer number.
f. Write an SQL query that displays the total number of records in the order details table.
g. Write an SQL query that displays the average value of shipping charges for all of the records in the orders table.
h. Write an SQL query that displays the order number and the total amount of the subtotal and shipping charges for each record for all of the records in the orders table.
i. Write an SQL query that displays the order number and the customer number from the orders table and the corresponding vendor product number from the order details table for all of the orders in the orders table.
j. Write an SQL query that displays the order number and the shipping charges from the orders table and the corresponding vendor product number and quantity from the order details table for all of the orders that have an order type of either fax oremail.
Orders (Sample Records) Order Number Customer Number Order Type ubtotl Shipping Charges (numeric) 101 102 103 104 105 (character) 16822 10023 12476 16822 14562 (characte (nmeric) (numeric) 145.00 224.00 98.54 210.44 500.00 12.25 15.,66 848 24.00 5.65 Email Mail Order Details (Sample Records) Order Number (numeric) Vendor Product (character data (numeric) (numeric) Quantity Price 101 101 101 102 103 103 103 104 104 105 16.822 10,023 12.476 15,822 10.023 11.476 10,099 15,822 15.444 12.476 22.50 10.00 25.00 112.00 10.00 20.00 8.54 168.00 21.22 25.00 20
Step by Step Solution
3.40 Rating (172 Votes )
There are 3 Steps involved in it
a SELECT FROM orders b SELECT order ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
412-B-A-I-S (6945).docx
120 KBs Word File
