Exam Certified Data Engineer Associate All QuestionsBrowse all questions from this exam
Question 57

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

    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
meow_akkOption: B

PIVOT is correct.

athu07Option: B

PIVOT is correct.

benni_aleOption: B

B is correct

azure_bimonsterOption: B

Answer is B

AndreFROption: B

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] } [, ...] ) }