PrepAway - Latest Free Exam Questions & Answers

Tag: Briefing 70-761 (update November 1st, 2017)

Briefing 70-761: Querying Data with Transact-SQL (update November 1st, 2017)

You need to create a query that returns each complaint,…

SIMULATION
You have a database that contains the following tables.

You need to create a query that returns each complaint, the names of the employees handling the complaint,
and the notes on each interaction. The Complaint field must be displayed first, followed by the employee’s
name and the notes. Complaints must be returned even if no interaction has occurred.
Construct the query using the following guidelines:
Use two-part column names.
Use one-part table names.
Use the first letter of the table name as its alias.
Do not Transact-SQL functions.
Do not use implicit joins.
Do not surround object names with square brackets.
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.

1 SELECT c.Complaint, e.Name, i.Notes
2 FROM Complaints c
3 JOIN __________________
4 JOIN __________________

You need to create a Transact-SQL query to meet the fol…

SIMULATION
You create a table named Products.Sales by running the following Transact-SQL statement:
CREATE TABLE Products.Sales (
SalesId int IDENTIFY(1,1) PRIMARY KEY,
SalesDate DateTime NOT NULL,
SalesAmount decimal(18,2) NULL
)
You add the following data to the table.

You are developing a report to display monthly sales data.
You need to create a Transact-SQL query to meet the following requirements:
Retrieve a column for the year followed by a column for each month from January through December.
Include the total sales amount for each month.
Aggregate columns by year, month, and then amount.
Construct the query using the following guidelines:
Use the MONTH keyword as the interval when using the DATANAME function.
Do not modify the provided IN clause.
Do not surround object names with square brackets.
Do not use implicit joins.
Do not use the DATEPART function.
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.
1. SELECT * FROM
2. (SELECT YEAR(SalesData)) AS Year, DATENAME (MONTH, SalesDate) AS Month,
SalesAmount AS Amount
3.
4. ) AS MonthlySalesData
5.6. FOR Month IN (January, February, March, April, May, June, July, August,
September, October, November, December))
AS MonthNamePivot

What should you implement?

Note: This question is part of a series of questions that use the same or similar answer choices. An
answer choice may be correct for more than one question in the series. Each question is independent
of the other questions in this series. Information and details provided in a question apply only to that
question.
Multiple processes use the data from a table named Sales and place it in other databases across the
organization. Some of the processes are not completely aware of the data types in the Sales table. This leads
to data type conversion errors.
You need to implement a method that returns a NULL value id data conversion fails instead of throwing an
error.
What should you implement?

Which five Transact-SQL segments should you use to deve…

DRAG DROP
You have two tables named UserLogin and Employee respectively.
You need to create a Transact-SQL script that meets the following requirements:
The script must update the value of theIsDeleted column for the UserLogin table to 1 if the value of the Id
column for the UserLogin table is equal to 1.
The script must update the value of the IsDeleted column of the Employee table to 1 if the value of the Id
column is equal to 1 for the Employee table when an update to the UserLogin table throws an error.
The error message “No tables updated!” must be produced when an update to the Employee table throws
an error.
Which five Transact-SQL segments should you use to develop the solution? To answer, move the appropriate
Transact-SQL segments from the list of Transact-SQL segments to the answer area and arrange them in the
correct order.
Select and Place:

Solution: You run the following Transact-SQL statement:…

Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a database that includes the tables shown in the exhibit (Click the Exhibit button.)

You need to create a Transact-SQL query that returns the following information:
the customer number
the customer contact name
the date the order was placed, with a name of DateofOrder
a column named Salesperson, formatted with the employee first name, a space, and the employee last
name
orders for customers where the employee identifier equals 4
The output must be sorted by order date, with the newest orders first.
The solution must return only the most recent order for each customer.
Solution: You run the following Transact-SQL statement:

Does the solution meet the goal?

Solution: You run the following Transact-SQL statement:…

Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a database that includes the tables shown in the exhibit (Click the Exhibit button.)

You need to create a Transact-SQL query that returns the following information:
the customer number
the customer contact name
the date the order was placed, with a name of DateofOrder
a column named Salesperson, formatted with the employee first name, a space, and the employee last
name
orders for customers where the employee identifier equals 4
The output must be sorted by order date, with the newest orders first.
The solution must return only the most recent order for each customer.
Solution: You run the following Transact-SQL statement:

Does the solution meet the goal?

Solution: You run the following Transact-SQL statement:…

Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a database that includes the tables shown in the exhibit (Click the Exhibit button.)

You need to create a Transact-SQL query that returns the following information:
the customer number
the customer contact name
the date the order was placed, with a name of DateofOrder
a column named Salesperson, formatted with the employee first name, a space, and the employee last
name
orders for customers where the employee identifier equals 4
The output must be sorted by order date, with the newest orders first.
The solution must return only the most recent order for each customer.
Solution: You run the following Transact-SQL statement:

Does the solution meet the goal?

Solution: You run the following Transact-SQL statement:…

Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. you will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
You have a database that tracks orders and deliveries for customers in North America. The database contains
the following tables:
Sales.Customers

Application.Cities

Sales.CustomerCategories

The company’s development team is designing a customer directory application. The application must list
customers by the area code of their phone number. The area code is defined as the first three characters of the
phone number.
The main page of the application will be based on an indexed view that contains the area and phone number
for all customers.
You need to return the area code from the PhoneNumber field.
Solution: You run the following Transact-SQL statement:

Does the solution meet the goal?


Page 2 of 912345...Last »