CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 55: 70-761: Querying Data with Transact-SQL

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 e…

Nội dung câu hỏi

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.

Minh họa câu hỏi Minh họa câu hỏi Minh họa câu hỏi

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. Please see explanation UNPIVOT must be used to rotate columns of the Rawsurvey table into column values. References:https://technet.microsoft.com/en-us/library/ms177410(v=sql.105).aspx — đáp án hiện tạiLựa chọn A

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề