Home » Microsoft » 70-461 v.2 » How should you complete the relevant Transact-SQL script?
HOTSPOT
You are developing an SQL Server database. The database contains two tables and a function that are defined by the following Transact-SQL statements.
You need to create a query to determine the total number of products that are sold each day for the live top-selling products on that particular day.
How should you complete the relevant Transact-SQL script? To answer, select the appropriate Transact-SQL statements from each list in the answer area.
Hot Area:
Correct Answer:
Explanation/Reference:
The APPLY operator allows you to invoke a table-valued function for each row returned by an outer table expression of a query. T
There are two forms of APPLY: CROSS APPLY and OUTER APPLY. CROSS APPLY returns only rows from the outer table that produce a result set from the table-valued function. OUTER APPLY returns both rows that produce a result set, and rows that do not, with NULL values in the columns produced by the table-valued function.
Reference: Using APPLY
https://technet.microsoft.com/en-us/library/ms175156(v=sql.105).aspx