Question 46
You have a database containing the following tables:
Servers
Errors
You have a user-defined, scalar function named IPLookup that takes a DNS name as a parameter and returns the IP address of the server. You have an additional user-defined, scalar function named DNSLookup, that takes an IP address as a parameter and returns a DNS name.
You create a view named vwErrors by running the following Transact-SQL statement:
You need to insert data by using the view.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL segments to the correct location. Each Transact-SQL segments 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.
Question 47
You deploy a hybrid Active Directory Domain Services (AD DS) and Azure Active Directory (Azure AD) environment. You need to implement a synchronization process that meets the following requirements:
* Monitor latency trends for synchronization processes.
* Configure automated email notifications when data synchronization to Azure AD is unsuccessful.
* Monitor operational metrics, performance metrics, and status of on-premises domain controllers.
* Monitor replication status of on-premises domain controllers.
* Monitor connections and receive automated alerts when abnormalities occur.
Which technologies should you use? To answer, drag the appropriate technologies to the correct tasks. Each technology 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.
Question 48
SIMULATION
You have a database that contains the following tables.
You need to create a query that lists the lowest-performing salespersons based on the current year-to-date sales period. The query must meet the following requirements:
Return a column named Fullname that includes the salesperson FirstName, a space, and then
LastName.
Include the current year-to-date sales for each salesperson.
Display only data for the three salespersons with the lowest year-to-year sales values.
Exclude salespersons that have no value for TerritoryID.
Construct the query using the following guidelines:
Use the first letter of a table name as the table alias.
Use two-part column names.
Do not surround object names with square brackets.
Do not use implicit joins.
Use only single quotes for literal text.
Use aliases only if required.

Part of the correct Transact-SQL has been provided in the answer area below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been provided as well as below it.
Use the Check Syntax button to verify your work. Any syntax or spelling errors will be reported by line and character position.
Question 49
HOTSPOT
You have the following stored procedure:
You run the following Transact-SQL statements:
What is the result of each Transact-SQL statement? To answer, select the appropriate options in the answer area.
Question 50
You have a database that contains a table named Products in the sales schema. The table was created by running the following Transact-SQL statement:
The table includes the data shown below:
You are developing a report that displays the following values and column headers in the order listed below:
* average price of a product named Average
* the smallest number of products in stocK-named LowestNumber
* the highest product price named HighestPrice
You need to write a query to return the results for the report The query must meet the following requirements:
You need to write a query to return the results for the report. The query must meet the following requirements:
* Use built-in, aggregate anfa*mathematical functions.
* Use two-part names and tables.
* Use the table alias to qualify column names.
* Define the alias for all fields by using the AS keyword.
* Use the first letter of the table name as the table alias.
* Do not use the Row_number function.
* Do not surround object names with square brackets.
* Do not use variables.
Part of the correct Transact-SQL has been provided in the answer area below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been provided as well as below it.





