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
You have a database that stored information about servers and application errors.
The database contains the following tables.
Servers
Errors
You need to return all error log messages and the server where the error occurs most often.
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
You have a database that stored information about servers and application errors.
The database contains the following tables.
Servers
Errors
You are building a webpage that shows the three most common errors for each server. You need to return the data for the webpage.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL segments to the correct location. 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.
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?
A)
B)
C)
D)
E)
- A . Option A
- B . Option B
- C . Option C
- D . Option D
SIMULATION
You have a table named Cities that has the following two columns: CityID and CityName. The CityID column uses the int data type, and CityName uses nvarchar(max).
You have a table named RawSurvey. Each row includes an identifier for a question and the number of persons that responded to that question from each of four cities.
The table contains the following representative data:
A reporting table named SurveyReport has the following columns: CityID, QuestionID, and RawCount, where RawCount is the value from the RawSurvey table.
You need to write a Transact-SQL query to meet the following requirements:
– Retrieve data from the RawSurvey table in the format of the SurveyReport table.
– The CityID must contain the CityID of the city that was surveyed.
– The order of cities in all SELECT queries must match the order in the RawSurvey table.
– The order of cities in all IN statements must match the order in the RawSurvey table.
Construct the query using the following guidelines:
– Use one-part names to reference tables and columns, except where not possible.
– ALL SELECT statements must specify columns.
– Do not use column or table aliases, except those provided.
– 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.
DRAG DROP
You create three tables by running the following Transact-SQL statements:
For reporting purposes, you need to find the active user count for each role, and the total active user count. The result must be ordered by active user count of each role. You must use common table expressions (CTEs).
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.
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 have a database that contains tables named Customer_CRMSystem and Customer_HRSystem.
Both tables use the following structure:
The tables include the following records:
Customer_CRMSystem
Customer_HRSystem
Records that contain null values for CustomerCode can be uniquely identified by CustomerName.
You need to display a list of customers that do not appear in the Customer_HRSystem table.
Which Transact-SQL statement should you run?
A)
B)
C)
D)
E)
F)
G)
H)
- A . Option A
- B . Option B
- C . Option C
- D . Option D
- E . Option E
- F . Option F
- G . Option G
- H . Option H
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 have a database that contains tables named Customer_CRMSystem and Customer_HRSystem. Both tables use the following structure:
The tables include the following records:
Customer_CRMSystem
Customer_HRSystem
Records that contain null values for CustomerCode can be uniquely identified by CustomerName. You need to display customers who appear in both tables and have a proper CustomerCode.
Which Transact-SQL statement should you run?
- A .
- B .
- C .
- D .
- E .
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 have a database that contains tables named Customer_CRMSystem and Customer_HRSystem.
Both tables use the following structure:
The tables include the following records:
Customer_ CRMSystem
Customer_ HRSystem
Records that contain null values for CustomerCode can be uniquely identified by CustomerName. You need to display a Cartesian product, combining both tables.
Which Transact-SQL statement should you run?
- A .
- B .
- C .
- D .
- E .
- F .
- G .
- H .
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 have a database that contains tables named Customer_CRMSystem and Customer_HRSystem.
Both tables use the following structure:
The tables include the following records:
Customer_ CRMSystem
Customer_ HRSystem
Records that contain null values for CustomerCode can be uniquely identified by CustomerName.
You need to create a list of all unique customers that appear in either table.
Which Transact-SQL statement should you run?
- A .
- B .
- C .
- D .
- E .
- F .
- G .
- H .
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 are developing a database to track customer orders. The database contains the following tables: Sales.Customers, Sales.Orders, and Sales.OrderLines.
The following table describes the columns in Sales.Customers.
The following table describes the columns in Sales.Orders.
The following table describes the columns in Sales.OrderLines.
You need to create a function that accepts a CustomerID as a parameter and returns the following information:
– all customer information for the customer
– the total number of orders for the customer
– the total price of all orders for the customer
– the average quantity of items per order
How should you complete the function definition? To answer, drag the appropriate Transact-SQL segment to the correct locations. 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.