Created
February 25, 2018 10:49
-
-
Save vithalsamp/6475755f4ae893be7b0383cec7315e6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select | |
| max(new_col) as max_col | |
| from | |
| ( | |
| --this part of the query is a derived table | |
| select col+1 as new_col from table | |
| ) as tab1 -- derived table have an alias name. | |
| hive> select max(new_col) as max_col from (select id+1 as new_col from dept) tab1 ; | |
| Query ID = admin_20180119131810_4e7e71e6-4ac7-4d47-8ef0-3ca58e90999e | |
| Total jobs = 1 | |
| Launching Job 1 out of 1 | |
| … | |
| OK | |
| 301 | |
| Time taken: 8.17 seconds, Fetched: 1 row(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment