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)

Which Transact-SQL statement should you use?

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 on 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 discover an application bug that impacts customer data for records created on or after January 1, 2014. In
order to fix the data impacted by the bug, application programmers require a report that contains customer data
as it existed on December 31, 2013.
You need to provide the query for the report.
Which Transact-SQL statement should you use?

How should you complete the Transact-SQL statement?

DRAG DROP
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 on 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 are creating a report to show when the first customer account was opened in each city. The report contains
a line chart with the following characteristics:
The chart contains a data point for each city, with lines connecting the points.
The X axis contains the position that the city occupies relative to other cities.
The Y axis contains the date that the first account in any city was opened.
An example chart is shown below for five cities:

During a sales promotion, customers from various cities open new accounts on the same date.
You need to write a query that returns the data for the chart.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL
segments to the correct locations. Each Transact-SQL segment 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:

Which two Transact-SQL queries will achieve the goal?

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 on 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.

Which Transact-SQL statement should you run?

You have a database that contains the following tables:
Customer

CustomerAudit

Where the value of the CustomerID column equals 3, you need to update the value of the CreditLimit column to
1000 for the customer. You must ensure that the change to the record in the Customer table is recorded on the
CustomerAudit table.
Which Transact-SQL statement should you run?

You need to write a query that meets the following requ…

SIMULATION
You create a table named Sales.Orders by running the following Transact-SQL statement:

You need to write a query that meets the following requirements:
removes orders from the table that were placed before January 1, 2012
uses the date format of YYYYMMDD
ensures that the order has been shipped before deleting the record
Construct the query using the following guidelines:
use one-part column names and two-part table names
do not use functions
do not surround object names with square brackets
do not use variables
do not use aliases for column names and table names

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.

You need to create a query that lists the lowest-perfor…

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.

You need to create a query that lists all complaints fr…

SIMULATION
You have a database that contains the following tables.

You need to create a query that lists all complaints from the Complaints table, and the name of the person
handling the complaints if a person is assigned. The ComplaintID must be displayed first, followed by the
person name.
Construct the query using the following guidelines:Use two-part column names.
Use one-part table names.
Do not use aliases for column names or table names.
Do not use 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.

Use the Check Syntax button to verify your work. Any syntax or spelling errors will be reported by line and
character position.

Which Transact-SQL statement should you run?

You have a database that includes the tables shown in the exhibit. (Click the exhibit button.)

You need to create a list of all customers, the order ID for the last order that the customer placed, and the date
that the order was placed. For customers who have not placed orders, you must substitute a zero for the order
ID and 01/01/1990 for the date.
Which Transact-SQL statement should you run?

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

DRAG DROP
You have a database that includes the following tables:

You need to create a list of all customer IDs and the date of the last order that each customer placed. If the
customer has not placed any orders, you must return the date January 1, 1900. The column names must be
CustomerID and LastOrderDate.
Which four 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:


Page 6 of 9« First...45678...Last »