Question: Write SQL codes for the below Questions: 1. Display the products with a standard price higher than the average standard price. 2. How
Write SQL codes for the below Questions:
1. Display the products with a standard price higher than the average standard price.
2. How many unique ship methods are available for orders with a total due greater than $500?
3. Show the total quantity of orders placed by vendors who have a purchasing web service URL.
4. Display the names of vendors who have shipped orders using more than one ship method.
5. Calculate the average tax amount for orders shipped by "Airfreight."
6. Display the products with the highest and lowest standard prices.
7. Count the number of orders placed by vendors located in states starting with the letter 'C.'
8. Display the vendors who have both a credit rating higher than 4 and a preferred vendor status.
9. Show the total quantity of orders placed in 2013 for products with an average lead time greater than 7
10. Display the total freight cost for all orders shipped by "Truck."

Purchase OrderDetail 125 Purchase OrderDetaillD 125 PurchaseOrderID DueDate 123 OrderQty 123 ProductID 123 UnitPrice 123 Line Total 123 ReceivedQty 125 RejectedQty 25 StockedQty ModifiedDate vendorWithAddresses 123 BusinessEntityID Name AddressType AddressLine1 AddressLine2 City StateProvinceName PostalCode Country RegionName PurchaseOrderHeader 123 PurchaseOrderID 123 Revision Number 123 Status 123 EmployeelD 123 VendorID 123 ShipMethodID Order Date ShipDate 123 SubTotal 123 TaxAmt 123 Freight 123 TotalDue Modified Date Vendor 123 BusinessEntityID Account Number Name 123 CreditRating 123 PreferredVendor Status 123 ActiveFlag PurchasingWebServiceURL ModifiedDate ProductVendor 125 ProductID 123 BusinessEntityID 123 AverageLeadTime 123 StandardPrice 125 LastReceiptCost LastReceiptDate 123 MinOrderQty 123 MaxOrderQty 125 OnOrderQty UnitMeasureCode ModifiedDate ShipMethod 125 ShipMethodID Name 25 ShipBase 123ShipRate rowguid ModifiedDate WendorWithContacts 123 BusinessEntityID Name ContactType Title FirstName MiddleName LastName Suffix PhoneNumber PhoneNumberType C EmailAddress 125 EmailPromotion
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
