Certified Data Engineer Associate Exam QuestionsBrowse all questions from this exam

Certified Data Engineer Associate Exam - Question 57


Which of the following SQL keywords can be used to convert a table from a long format to a wide format?

Show Answer
Correct Answer: B

In SQL, the PIVOT keyword is used to transform data from a long format to a wide format. This involves turning the unique values of a specified column into multiple columns in the output. It is particularly useful for summarizing data and making it more readable or suitable for certain types of analysis.

Discussion

5 comments
Sign in to comment
meow_akkOption: B
Oct 22, 2023

PIVOT is correct.

athu07Option: B
Oct 24, 2023

PIVOT is correct.

AndreFROption: B
Dec 20, 2023

https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-qry-select-pivot.html “Pivot” transforms the rows of the table_reference by rotating unique values of a specified column list into separate columns. SYNTAX : table_reference PIVOT ( { aggregate_expression [ [ AS ] agg_column_alias ] } [, ...] FOR column_list IN ( expression_list ) ) column_list { column_name | ( column_name [, ...] ) } expression_list { expression [ AS ] [ column_alias ] | { ( expression [, ...] ) [ AS ] [ column_alias] } [, ...] ) }

azure_bimonsterOption: B
Jan 20, 2024

Answer is B

benni_aleOption: B
Apr 29, 2024

B is correct