This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
You run the following query: SELECT OrderNo, CHOOSE(Status, 'Ordered', 'Shipped', 'Delivered') AS OrderState FROM Sales.Order; Which OrderState value is returned for rows with a Status value of 2?
Shipped
Delivered
NULL
You must return the number of customers in each city. Which query should you use?
SELECT City, COUNT(*) AS CustomerCount FROM Sales.Customer;
SELECT City, COUNT(*) AS CustomerCount FROM Sales.Customer GROUP BY City;
SELECT City, COUNT(*) AS CustomerCount FROM Sales.Customer ORDER BY City;
You must return a row for each category with an average price over 10.00. Which query should you use?
SELECT Category, AVG(Price) FROM Store.Product WHERE AVG(Price) > 10.00;
SELECT Category, AVG(Price) FROM Store.Product GROUP BY Category WHERE AVG(Price) > 10.00;
SELECT Category, AVG(Price) FROM Store.Product GROUP BY Category HAVING AVG(Price) > 10.00;
You must answer all questions before checking your work.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?