PrepAway - Latest Free Exam Questions & Answers

Category: 70-761 (v.1)

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

Which Transact-SQL statement should you run?

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 to that
question.
You have a database for a banking system. The database has two tables named tblDepositAcct and
tblLoanAcct that store deposit and loan accounts, respectively. Both tables contain the following columns:

You need to run a query to find the total number of customers who have both deposit and loan accounts.
Which Transact-SQL statement should you run?

Which Transact-SQL statement should you run?

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 to that
question.
You have a database for a banking system. The database has two tables named tblDepositAcct and
tblLoanAcct that store deposit and loan accounts, respectively. Both tables contain the following columns:

You need to determine the total number of customers who have only loan accounts.
Which Transact-SQL statement should you run?

Which Transact-SQL statement should you run?

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 to that
question.
You have a database for a banking system. The database has two tables named tblDepositAcct and
tblLoanAcct that store deposit and loan accounts, respectively. Both tables contain the following columns:

You need to determine the total number of customers who have either deposit accounts or loan accounts, but
not both types of accounts.
Which Transact-SQL statement should you run?

Which object should you use to join the SalesSummary ta…

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 in this series.
Start of repeated scenario
You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)

You review the Employee table and make the following observations:
Every record has a value in the ManagerID except for the Chief Executive Officer (CEO).
The FirstName and MiddleName columns contain null values for some records.
The valid values for the Title column are Sales Representative manager, and CEO.
You review the SalesSummary table and make the following observations:
The ProductCode column contains two parts: The first five digits represent a product code, and the last
seven digits represent the unit price. The unit price uses the following pattern: ####.##.
You observe that for many records, the unit price portion of the ProductCode column contains values.
The RegionCode column contains NULL for some records.
Sales data is only recorded for sales representatives.
You are developing a series of reports and procedures to support the business. Details for each report or
procedure follow.
Sales Summary report: This report aggregates data by year and quarter. The report must resemble the
following table.

Sales Manager report: This report lists each sales manager and the total sales amount for all employees that
report to the sales manager.
Sales by Region report: This report lists the total sales amount by employee and by region. The report must
include the following columns: EmployeeCode, MiddleName, LastName, RegionCode, and SalesAmount. If
MiddleName is NULL, FirstName must be displayed. If both FirstName and MiddleName have null values, the
world Unknown must be displayed/ If RegionCode is NULL, the word Unknown must be displayed.
Report1: This report joins data from SalesSummary with the Employee table and other tables. You plan to
create an object to support Report1. The object has the following requirements:
be joinable with the SELECT statement that supplies data for the report
can be used multiple times with the SELECT statement for the report
be usable only with the SELECT statement for the report
not be saved as a permanent object
Report2: This report joins data from SalesSummary with the Employee table and other tables.
You plan to create an object to support Report1. The object has the following requirements:
be joinable with the SELECT statement that supplies data for the report
can be used multiple times for this report and other reports
accept parameters
be saved as a permanent object
Sales Hierarchy report: This report aggregates rows, creates subtotal rows, and super-aggregates rows over
the SalesAmount column in a single result-set. The report uses SaleYear, SaleQuarter, and SaleMonth as a
hierarchy. The result set must not contain a grand total or cross-tabulation aggregate rows.
Current Price Stored Procedure: This stored procedure must return the unit price for a product when a product
code is supplied. The unit price must include a dollar sign at the beginning. In addition, the unit price must
contain a comma every three digits to the left of the decimal point, and must display two digits to the left of the
decimal point. The stored procedure must not throw errors, even if the product code contains invalid data.
End of Repeated Scenario
You are creating the queries for Report1 and Report2.
You need to create the objects necessary to support the queries.
Which object should you use to join the SalesSummary table with the other tables that each report uses? To
answer, drag the appropriate objects to the correct reports. each object 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.
Select and Place:

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

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 in this series.
Start of repeated scenario
You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)

You review the Employee table and make the following observations:Every record has a value in the ManagerID except for the Chief Executive Officer (CEO).
The FirstName and MiddleName columns contain null values for some records.
The valid values for the Title column are Sales Representative manager, and CEO.
You review the SalesSummary table and make the following observations:
The ProductCode column contains two parts: The first five digits represent a product code, and the last
seven digits represent the unit price. The unit price uses the following pattern: ####.##.
You observe that for many records, the unit price portion of the ProductCode column contains values.
The RegionCode column contains NULL for some records.
Sales data is only recorded for sales representatives.
You are developing a series of reports and procedures to support the business. Details for each report or
procedure follow.
Sales Summary report: This report aggregates data by year and quarter. The report must resemble the
following table.

Sales Manager report: This report lists each sales manager and the total sales amount for all employees that
report to the sales manager.
Sales by Region report: This report lists the total sales amount by employee and by region. The report must
include the following columns: EmployeeCode, MiddleName, LastName, RegionCode, and SalesAmount. If
MiddleName is NULL, FirstName must be displayed. If both FirstName and MiddleName have null values, the
world Unknown must be displayed/ If RegionCode is NULL, the word Unknown must be displayed.
Report1: This report joins data from SalesSummary with the Employee table and other tables. You plan to
create an object to support Report1. The object has the following requirements:
be joinable with the SELECT statement that supplies data for the report
can be used multiple times with the SELECT statement for the report
be usable only with the SELECT statement for the report
not be saved as a permanent object
Report2: This report joins data from SalesSummary with the Employee table and other tables.
You plan to create an object to support Report1. The object has the following requirements:
be joinable with the SELECT statement that supplies data for the report
can be used multiple times for this report and other reports
accept parameters
be saved as a permanent object
Sales Hierarchy report: This report aggregates rows, creates subtotal rows, and super-aggregates rows over
the SalesAmount column in a single result-set. The report uses SaleYear, SaleQuarter, and SaleMonth as a
hierarchy. The result set must not contain a grand total or cross-tabulation aggregate rows.
Current Price Stored Procedure: This stored procedure must return the unit price for a product when a product
code is supplied. The unit price must include a dollar sign at the beginning. In addition, the unit price mustcontain a comma every three digits to the left of the decimal point, and must display two digits to the left of the
decimal point. The stored procedure must not throw errors, even if the product code contains invalid data.
End of Repeated Scenario
You need to create the query for the Sales Managers report.
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:

How should you complete the Transact-SQL statement?

HOTSPOT
You have a database that contains the following tables: tblRoles, tblUsers, and tblUsersInRoles.
The table tblRoles is defined as follows.

You have a function named ufnGetRoleActiveUsers that was created by running the following Transact-SQL
statement:

You need to list all roles and their corresponding active users. The query must return the RoleId, RoleName,
and UserName columns. If a role has no active users, a NULL value should be returned as the UserName for
that role.How should you complete the Transact-SQL statement? To answer, select the appropriate Transact-SQL
segments in the answer area.
Hot Area:

How should you complete the Transact-SQL statement?

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

A delivery person enters an incorrect value for the CustomerID column in the Invoices table and enters the
following text in the ConfirmedReceivedBy column: “Package signed for by the owner Tim.”
You need to find the records in the Invoices table that contain the word Tim in the CustomerName field.
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 three Transact-SQL segments should you use to dev…

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 in this series.Start of repeated scenario
You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)

You review the Employee table and make the following observations:
Every record has a value in the ManagerID except for the Chief Executive Officer (CEO).
The FirstName and MiddleName columns contain null values for some records.
The valid values for the Title column are Sales Representative manager, and CEO.
You review the SalesSummary table and make the following observations:
The ProductCode column contains two parts: The first five digits represent a product code, and the last
seven digits represent the unit price. The unit price uses the following pattern: ####.##.
You observe that for many records, the unit price portion of the ProductCode column contains values.
The RegionCode column contains NULL for some records.
Sales data is only recorded for sales representatives.
You are developing a series of reports and procedures to support the business. Details for each report or
procedure follow.
Sales Summary report: This report aggregates data by year and quarter. The report must resemble the
following table.

Sales Manager report: This report lists each sales manager and the total sales amount for all employees that
report to the sales manager.Sales by Region report: This report lists the total sales amount by employee and by region. The report must
include the following columns: EmployeeCode, MiddleName, LastName, RegionCode, and SalesAmount. If
MiddleName is NULL, FirstName must be displayed. If both FirstName and MiddleName have null values, the
world Unknown must be displayed/ If RegionCode is NULL, the word Unknown must be displayed.
Report1: This report joins data from SalesSummary with the Employee table and other tables. You plan to
create an object to support Report1. The object has the following requirements:
be joinable with the SELECT statement that supplies data for the report
can be used multiple times with the SELECT statement for the report
be usable only with the SELECT statement for the report
not be saved as a permanent object
Report2: This report joins data from SalesSummary with the Employee table and other tables.
You plan to create an object to support Report1. The object has the following requirements:
be joinable with the SELECT statement that supplies data for the report
can be used multiple times for this report and other reports
accept parameters
be saved as a permanent object
Sales Hierarchy report: This report aggregates rows, creates subtotal rows, and super-aggregates rows over
the SalesAmount column in a single result-set. The report uses SaleYear, SaleQuarter, and SaleMonth as a
hierarchy. The result set must not contain a grand total or cross-tabulation aggregate rows.
Current Price Stored Procedure: This stored procedure must return the unit price for a product when a product
code is supplied. The unit price must include a dollar sign at the beginning. In addition, the unit price must
contain a comma every three digits to the left of the decimal point, and must display two digits to the left of the
decimal point. The stored procedure must not throw errors, even if the product code contains invalid data.
End of Repeated Scenario
You need to create a query to return the data for the Sales Summary report.
Which three 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:

Which function should you apply to each column?

HOTSPOT
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.
Start of repeated scenario
You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)

You review the Employee table and make the following observations:
Every record has a value in the ManagerID except for the Chief Executive Officer (CEO).
The FirstName and MiddleName columns contain null values for some records.
The valid values for the Title column are Sales Representative manager, and CEO.
You review the SalesSummary table and make the following observations:
The ProductCode column contains two parts: The first five digits represent a product code, and the last
seven digits represent the unit price. The unit price uses the following pattern: ####.##.
You observe that for many records, the unit price portion of the ProductCode column contains values.
The RegionCode column contains NULL for some records.
Sales data is only recorded for sales representatives.
You are developing a series of reports and procedures to support the business. Details for each report or
procedure follow.
Sales Summary report: This report aggregates data by year and quarter. The report must resemble the following table.

Sales Manager report: This report lists each sales manager and the total sales amount for all employees that
report to the sales manager.
Sales by Region report: This report lists the total sales amount by employee and by region. The report must
include the following columns: EmployeeCode, MiddleName, LastName, RegionCode, and SalesAmount. If
MiddleName is NULL, FirstName must be displayed. If both FirstName and MiddleName have null values, the
world Unknown must be displayed/ If RegionCode is NULL, the word Unknown must be displayed.
Report1: This report joins data from SalesSummary with the Employee table and other tables. You plan to
create an object to support Report1. The object has the following requirements:
be joinable with the SELECT statement that supplies data for the report
can be used multiple times with the SELECT statement for the report
be usable only with the SELECT statement for the report
not be saved as a permanent object
Report2: This report joins data from SalesSummary with the Employee table and other tables.
You plan to create an object to support Report1. The object has the following requirements:
be joinable with the SELECT statement that supplies data for the report
can be used multiple times for this report and other reports
accept parameters
be saved as a permanent object
Sales Hierarchy report: This report aggregates rows, creates subtotal rows, and super-aggregates rows over
the SalesAmount column in a single result-set. The report uses SaleYear, SaleQuarter, and SaleMonth as a
hierarchy. The result set must not contain a grand total or cross-tabulation aggregate rows.
Current Price Stored Procedure: This stored procedure must return the unit price for a product when a product
code is supplied. The unit price must include a dollar sign at the beginning. In addition, the unit price must
contain a comma every three digits to the left of the decimal point, and must display two digits to the left of the
decimal point. The stored procedure must not throw errors, even if the product code contains invalid data.
End of Repeated Scenario
You need to create the query for the Sales by Region report.
Which function should you apply to each column? To answer, select the appropriate options in the answer area.
Hot Area:


Page 1 of 912345...Last »