Hive Code snippets

Hive SQL

Select top N records in SQL / Hive

In different databases, the syntax of selecting top N records are slightly different. They may also differ from ISO standards.

View detail
Hive SQL

Select from dual in SQL / Hive

In Oracle database, you can select from dual table if you only want to return a one row result set. In many other databases, the query engine supports select directly from constant values without specifying a table name. 

View detail