...
- A SELECT statement can be part of a union query or a subquery of another query.
table_reference
indicates the input to the query. It can be a regular table, a view, a join construct or a subquery.- Simple query. For example, the following query retrieves all columns and all rows from table t1.
Code Block |
---|
|
SELECT * FROM t1
|
WHERE Clause
The where WHERE condition is a boolean expression. For example, the following query returns only those sales records which have an amount greater than 10 from the US region. Hive supports a number of operators and UDFs in the where WHERE clause.:
Code Block |
---|
|
SELECT * FROM sales WHERE amount > 10 AND region = "US"
|
...