Table of Contents |
---|
GROUP BY; SORT BY, ORDER BY, CLUSTER BY, DISTRIBUTE BY; JOIN (Hive Joins, Join Optimization, Outer Join Behavior); UNION; TABLESAMPLE; Subqueries; Virtual Columns; Operators and UDFs; LATERAL VIEW; Windowing, OVER, and Analytics; Common Table Expressions
Select Syntax
Code Block |
---|
[WITH CommonTableExpression (, CommonTableExpression)*] (Note: Only available starting with Hive 0.13.0) SELECT [ALL | DISTINCT] select_expr, select_expr, ... FROM table_reference [WHERE where_condition] [GROUP BY col_list] [ORDER BY col_list] [CLUSTER BY col_list | [DISTRIBUTE BY col_list] [SORT BY col_list] ] [LIMIT number] |
...
See the following documents for additional syntax and features of SELECT statements:
- GROUP BY
- SORT BY, ORDER BY, CLUSTER BY, DISTRIBUTE BY
- JOIN
- UNION
- TABLESAMPLE
- Subqueries
- Virtual Columns
- Operators and UDFs
- LATERAL VIEW
- Windowing, OVER, and Analytics
- Common Table Expressions