This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In-depth articles on Microsoft developer tools and technologies
Personalized learning paths and courses
Globally recognized, industry-endorsed credentials
Technical questions and answers moderated by Microsoft
Code sample library for Microsoft developer tools and technologies
Interactive, curated guidance and recommendations
Thousands of hours of original programming from Microsoft experts
Microsoft Applied Skills
Showcase real-world skills. Stand out!
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?