jump to navigation

70-761 Exam Dumps Questions

Question # 1:
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 several connected tables. The tables contain sales data for customers in the United States only.

You have the following partial query for the database. (Line numbers are included for reference only.)

You need to complete the query to generate the output shown in the following table:

Which statement clause should you add at line 3?
A. GROUP BY
B. MERGE
C. GROUP BY ROLLUP
D. LEFT JOIN
E. GROUP BY CUBE
F. CROSS JOIN
G. PIVOT
H. UNPIVOT
Answer: E

Explanation:

Example of GROUP BY CUBE result set:
In the following example, the CUBE operator returns a result set that has one grouping for all possible
combinations of columns in the CUBE list and a grand total grouping.

References:

https://technet.microsoft.com/en-us/library/bb522495(v=sql.105).aspx

Question # 2:
You have a project management application. The application uses a Microsoft SQL Server database to store data. You are developing a software bug tracking add-on for the application.
The add-on must meet the following requirements:

You run the following Transact-SQL statement:

Users connect to an instance of the bug tracking application that is hosted in New York City. Users in Seattle must be able to display the local date and time for any bugs that they create.
You need to ensure that the DateCreated column displays correctly.
Which Transact-SQL statement should you run?
A. SELECT Id,Product,
DateCreated AT TIME ZONE ‘Pacific Standard Time’
FROM Bug
B. SELECT Id,Product,
DATEADD(hh, -8, DateCreated)
FROM Bug
C. SELECT Id,Product,
TODATETIMEOFFSET(DateCreated, -8)
FROM Bug
D. SELECT Id,Product,
CAST(DateCreated AS DATETIMEOFFSET)
FROM Bug
Answer: C
References:
https://docs.microsoft.com/en-us/sql/t-sql/functions/todatetimeoffset-transact-sql?view=sql-server-2017

Question # 3:
You run the following Transact-SQL statements:

You need to create a query that returns the total number of attendees for each combination of CourseID, CourseDate, and the following locations: Lisbon, London, and Seattle. The result set should resemble the following:

Which Transact-SQL code segment should you run?
A. SELECT *
FROM CourseParticipants
PIVOT(SUM(NumParticipants) FOR LocationDescription
IN (Lisbon, London, Seattle))
B. SELECT *
FROM CourseParticipants
PIVOT(SUM(NumParticipants) FOR LocationDescription
IN (Lisbon, London, Seattle)) as PVTTable
C. SELECT *
FROM CourseParticipants
UNPIVOT(SUM(NumParticipants) FOR LocationDescription
IN (Lisbon, London, Seattle)
D. SELECT *
FROM CourseParticipants
UNPIVOT(SUM(NumParticipants) FOR LocationDescription
IN (Lisbon, London, Seattle) AS PVTTable
Answer: B
Explanation
References:
https://www.techonthenet.com/sql_server/pivot.php

Question #:4
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?


A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
F. Option F
G. Option G
H. Option H

Answer: E

Explanation
Calculate aggregate column through AVG function and GROUP BY clause.

Question # 5:
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.

Answer:

Comments»

no comments yet - be the first?