Question
Need Help in SQL Exercise 1-->For repairs with SupplierID = 1502, list slRepair.RepairID, slRepair.RepairCost, slRepair.SupplierID. Order the list by RepairCost in ascending order. 2-->For Trips
Need Help in SQL Exercise
1-->For repairs with SupplierID = 1502, list slRepair.RepairID, slRepair.RepairCost, slRepair.SupplierID. Order the list by RepairCost in ascending order.
2-->For Trips with LaunchID = 12, list slTrip.WaterTemp and slTrip.LaunchID. Order the list by WaterTemp in descending order.
3-->For repairs with a repair cost greater than 90, list slRepair.RepairCost and slRepair.SupplierID. Order the list by RepairCost in ascending order.
4-->For Trips with a water temp lower than 70, list slTrip.WaterTemp and slTrip.LaunchID. Order the list by WaterTemp in descending order.
5-->List slSupplier.SupplierID and slSupplier.SupplierName for supplier AutoZone. Retrieve the record using slSupplier.SupplierName.
6-->List slPax.PaxID, slPax.PaxFirstName, and slPax.PaxLastName for passengers with lastname Singh. Order the list by PaxID in ascending order.
7-->For repairs with a repair cost greater than or equal to 10 and less than or equal to 15, list slRepair.RepairCost, and slRepair.SupplierID. The endpoints 10 and 15 should be included in the range. Order the list by RepairCost in ascending order.
8-->For repairs with a rounded up repair cost greater than or equal to 10 and less than or equal to 15, list slRepair.RepairCost, CostRounded, and slRepair.SupplierID. Compute CostRounded using the ROUND() function. ROUND() must be used in the WHERE predicate to filter correctly. The previous query "cost10-15" did not include RepairCost for 9.89 and 9.99 which would round up to 10. See the hint for further information. The endpoints 10 and 15 should be included in the range. Order the list by RepairCost in ascending order.
9-->Rewrite the query "Cost10-15" using the BETWEEN operator. For repairs with a repair cost greater than or equal to 10 and less than or equal to 15, list slRepair.RepairCost, and slRepair.SupplierID. The endpoints 10 and 15 should be included in the range. Order the list by RepairCost in ascending order.
10-->Rewrite the query "Cost10-15R" using the BETWEEN operator. For repairs with a rounded up repair cost greater than or equal to 10 and less than or equal to 15, list slRepair.RepairCost, CostRounded, and slRepair.SupplierID. Compute CostRounded using the ROUND() function. ROUND() must be used in the WHERE predicate to filter correctly. Use the BETWEEN operator. Order the list by RepairCost in ascending order.
11-->For repairs having supplierID 1501 OR 1517, list slRepair.RepairDate, slRepair.RepairCost, slRepair.SupplierID. Order the list first by SupplierID in ascending order and then by repair cost in descending order.
12-->List slPax.PaxID, slPax.PaxFirstName, and slPax.PaxLastName for passengers with lastname Clark OR Sharma OR Patel. Order the list by PaxID in ascending order.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started