Question
sql 1) Write a query against the TSQL2012 database to retrieve; from the production.products table, the [supplierId] and the count of products supplied by each
sql
1) Write a query against the TSQL2012 database to retrieve;
from the production.products table, the [supplierId] and the count of products supplied by each supplier that are not discontinued. Only return suppliers that supply 3 or more products. Order the list by the count returned in descending order then by [supplierId] in ascending order.
2)
Create a query that returns the following columns of the order placed by the customer with [Sales].[Customer].[AccountNumber] of AW00029716 on [ SalesOrderHeader].[OrderDate] March 31, 2014.
Sales.SalesOrderHeader.PurchaseOrderNumber, Sales.SalesOrderHeader.SubTotal, Sales.SalesOrderHeader.TaxAmt, Sales.SalesOrderHeader.TotalDue, Person.Address.AddressLine1, Person.Address.AddressLine2, Person.Address.City, Person.Address.PostalCode
3)
From the AdvetureWorks database's production.productCostHistory table;
Calculate the average [standardCost] of all active products with IDs 707 through to (and including) 799. Display this single value result set with 2 decimal places precision.
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