Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello! I need help creating some queries for Microsoft SQL Server. I need these

ID: 3728699 • Letter: H

Question

Hello! I need help creating some queries for Microsoft SQL Server. I need these queries created, assuming that the following table already exists in SQL, that achieve the requirements listed below:

tblAddress AddressID tblCompany CompanylD CompanyName BillingAddressID IsCustomer CustomerVenderSince DateLastModified tblProduct 9 ProductiD City StateProvince PostalCode Country ProductName CurrentStandardUnitPrice tblOrderLine tblCustomerOrder tblEmployee OrderNo EmployeelD LastName FirstName UserName UserPassword Phone SupervisorlD JobPositionlD OrderNo ProductID QuantityOrdered UnitPriceCharged DiscountRate QuantityPicked OrderDate FilledYesNo CompanylD ShippingAddressID EmployeelDTookOrder EmployeelDFilledOrder - tblJobPosition JobPositionID JobTitle

Explanation / Answer

1. select OrderNo,ProductID,UnitPriceCharged,DiscountRate,QuantityOrdered, Round(((UnitPriceCharged*QuantityOrdered)-DiscountRate*(UnitPriceCharged*QuantityOrdered)),2) as Total,QuantityPicked from tblOrderLine where OrderNo=610 order by ProductID

2. select OrderNo,SUM(Round(((UnitPriceCharged*QuantityOrdered)-DiscountRate*(UnitPriceCharged*QuantityOrdered)),2)) as GrandTotal from tblOrderLine where OrderNo=610

3. select YEAR(OrderDate) Year,MONTH(OrderDate) Month,count(*) as MonthlyTotalNoOfOrders from tblCustomerOrder GROUP BY YEAR(OrderDate),MONTH(OrderDate) HAVING MonthlyTotalNoOfOrders<20 ORDER BY MonthlyTotalNoOfOrders DESC,Year ASC, Month ASC


4. select DISTINCT StateProvince,Country from tblAddress where StateProvince like '%on%' order by StateProvince

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote