CORRECT TEXT
CORRECT TEXT
You have a table named Cities that has the following two columns: City ID 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 Survey Report table.
– The City ID must contain the City ID 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.
Answer: UNPIVOT
Latest 70-761 Dumps Valid Version with 212 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund