SELECT list
Description
The SELECT list names the columns, functions, and expressions that you want the query to return. The list represents the output of the query. (Redshift SQL Language Reference SELECT list)
The query start options are fully supported in Snowflake. Just keep in mind that in Snowflake the DISTINCT and ALL options must go at the beginning of the query.
Grammar Syntax
SELECT
[ TOP number ]
[ ALL | DISTINCT ] * | expression [ AS column_alias ] [, ...]Sample Source Patterns
Top clause
Input Code:
ID
NAME
MANAGER_ID
100
Carlos
null
101
John
100
102
Jorge
101
103
Kwaku
101
110
Liu
101
Output Code:
ID
NAME
MANAGER_ID
100
Carlos
null
101
John
100
102
Jorge
101
103
Kwaku
101
110
Liu
101
ALL
Input Code:
MANAGER_ID
null
100
101
101
101
102
103
103
103
104
104
102
104
Output Code:
MANAGER_ID
null
100
101
101
101
102
103
103
103
104
104
102
104
DISTINCT
Input Code:
MANAGER_ID
null
100
101
102
103
104
Output Code:
MANAGER_ID
null
100
101
102
103
104
Related EWIs
There are no known issues.
Last updated
