Question 71 of 156 from exam DP-900: Microsoft Azure Data Fundamentals

Question 71 of 156 from exam DP-900: Microsoft Azure Data Fundamentals

Question

DRAG DROP -

You have a table named Sales that contains the following data.

You need to query the table to return the average sales amount per day. The output must produce the following results.

How should you complete the query? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.

Select and Place:

Explanations

Box 1: SELECT -

Box 2: GROUP BY -

Example:

When used with a GROUP BY clause, each aggregate function produces a single value covering each group, instead of a single value covering the whole table. The following example produces summary values for each sales territory in the AdventureWorks2012 database. The summary lists the average bonus received by the sales people in each territory, and the sum of year-to-date sales for each territory.

SELECT TerritoryID, AVG(Bonus)as 'Average bonus', SUM(SalesYTD) as 'YTD sales'

FROM Sales.SalesPerson -

GROUP BY TerritoryID;

https://docs.microsoft.com/en-us/sql/t-sql/functions/avg-transact-sql