Need Help Solving Script Northwind Database Want Know Total Amount Sales Dollars Total Cos Q37063591

Need help solving this script from NorthWind database

I want to know the total amount of sales in dollars and thetotal cost of shipping for each country. Use the order details andorders tables, compute total sales usingunitprice*quantity-discount )


Solution


Dear Student ,

As per the requirement submitted above , kindly find the belowsolution.

This demonstration is using SQL Server 2014.

SQL Query:

select Shipcountry,Round(sum(unitprice*quantity-discount),2) as’Total Sales’,
round(sum(Freight),2) as ‘Shipping Cost’ from orders,[OrderDetails]
where orders.OrderID=[Order Details].OrderId
group by Shipcountry;

Screen in SQLServer Management Studio (SSMS):

뜻 SQLQuerylsql-NAGESH-PC.Northwind (NAGESH-PCNagesh (55)-Microsoft SQL Server M., File Edit View Query Project Debug Tools

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THESOLUTION.

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.