Microsoft 70-761 Querying Data with Transact-SQL Online Training
Microsoft 70-761 Online Training
The questions for 70-761 were last updated at Dec 20,2024.
- Exam Code: 70-761
- Exam Name: Querying Data with Transact-SQL
- Certification Provider: Microsoft
- Latest update: Dec 20,2024
DRAG DROP
You have a table named HR.Employees as shown in the exhibit. (Click the exhibit button.)
You need to write a query that will change the value of the job title column to Customer Representative for any employee who lives in Seattle and has a job title of Sales Representative. If the employee does not have a manager defined, you must not change the title.
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.
HOTSPOT You have the following Transact-SQL query:
What type of functions are used in the query? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.
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.
HOTSPOT
You run the following Transact-SQL statement:
You need to ensure that you can insert data into the table.
What are the characteristics of the data? To answer, select the appropriate options in the answer area.
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.
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.
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.
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?
A)
B)
C)
D)
- A . Option A
- B . Option B
- C . Option C
- D . Option D
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?
A)
B)
C)
D)
- A . Option A
- B . Option B
- C . Option C
- D . Option D
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.
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 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.