Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need answer For SQL Exercise. 1-->For repairs with a rounded up repair cost greater than or equal to 10 and less than or equal to

Need answer For SQL Exercise.

1-->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.

2-->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.

3-->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.

4-->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.

5-->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.

schema-->

image text in transcribed

sIMaintenance Column Name slGearPurchase Column Name Data Type Column N... Data Type Data Type RepairID int slShi sIPax RepairCost float Desciption varchar(500) Column N. Column Name PaND PaxFirstNeme Column Name Deta Type Data Type PurchaseAmount float ShiplD Gallons CostPerGallon float ShiplD float sITrip Column Name Data Type TriplD slLaunch sISupplier Column Name LaunchlD Launch Data Type Column Name Data Type SupplierlD int Column Name Data Type CensusiD PaxdD slWayPoint Column Name Data Type WayPointiD int slFloatPlan Column Name FloatPlanlD Data Type sIMaintenance Column Name slGearPurchase Column Name Data Type Column N... Data Type Data Type RepairID int slShi sIPax RepairCost float Desciption varchar(500) Column N. Column Name PaND PaxFirstNeme Column Name Deta Type Data Type PurchaseAmount float ShiplD Gallons CostPerGallon float ShiplD float sITrip Column Name Data Type TriplD slLaunch sISupplier Column Name LaunchlD Launch Data Type Column Name Data Type SupplierlD int Column Name Data Type CensusiD PaxdD slWayPoint Column Name Data Type WayPointiD int slFloatPlan Column Name FloatPlanlD Data Type

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

ISBN: 978-0764535376

More Books

Students also viewed these Databases questions