070-761 試験問題を無料オンラインアクセス

試験コード:070-761
試験名称:Querying Data with Transact-SQL
認定資格:Microsoft
無料問題数:205
更新日:2025-09-04
評価
100%

問題 1

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 columns 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 to supply data for the Sales Hierarchy report.
Which Transact-SQL keyword should you use for each operation? To answer, drag the appropriate Transact-SQL keywords to the correct operations. Each action may be used once, more than once or not at all.
You may drag the split bar between panes or scroll to view content.

問題 2

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 are building a stored procedure that will be used by hundreds of users concurrently.
You need to store rows that will be processed later by the stored procedure. The object that stores the rows must meet the following requirements:
* Be indexable
* Contain up-to-date statistics
* Be able to scale between 10 and 100,000 rows
The solution must prevent users from accessing one another's data.
Solution: You create a user-defined table in the stored procedure.
Does this meet the goal?

問題 3

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.
You create a table by running the following Transact-SQL statement:

You are developing a report that displays customer information. The report must contain a grand total column.
You need to write a query that returns the data for the report.
Which Transact-SQL statement should you run?

問題 4

You have a database named MyDb. You run the following Transact-SQL statements:

A value of 1 in the IsActive column indicates that a user is active.
You need to create a count for active users in each role. If a role has no active users. You must display a zero as the active users count.
Which Transact-SQL statement should you run?

問題 5

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?

コメントを追加

あなたのメールアドレスが公開されることはありません。個人情報に関する内容は隠されます *

insert code
画面にある文字を入力してください。