70-761 Querying Data with Transact-SQL

Loading demo links...

Showing 7–9 of 14 questions

Question 7

You have a date related query that would benefit from an indexed view.

You need to create the indexed view.

Which two Transact-SQL functions can you use? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

Select all that apply, then click Submit answer.

  • DATEADD

  • AT TIME ZONE

  • GETUTCDATE

  • DATEDIFF

Question 8

Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series.

You have a database that tracks orders and deliveries for customers in North America. System versioning is enabled for all tables. The database contains the Sales.Customers, Application.Cities, and Sales.CustomerCategories tables.

Details for the Sales.Customers table are shown in the following table:

Details for the Application.Cities table are shown in the following table:

Details for the Sales.CustomerCategories table are shown in the following table:

You need to create a query that meets the following requirements:

For customers that are not on a credit hold, return the CustomerID and the latest recorded population for the delivery city that is associated with the customer.

For customers that are on a credit hold, return the CustomerID and the latest recorded population for the postal city that is associated with the customer.

Which two Transact-SQL queries will achieve the goal? Each correct answer presents a complete solution.

Select all that apply, then click Submit answer.

  • Option A

  • Option B

  • Option C

  • Option D

Question 9

You need to create an indexed view that requires logic statements to manipulate the data that the view displays.

Which two database objects should you use? Each correct answer presents a complete solution.

Select all that apply, then click Submit answer.

  • a user-defined table-valued function

  • a CRL function

  • a stored procedure

  • a user-defined scalar function