hadoop - How to use a calculated column in same query to calculate another column and so on.. in Hive? -


i can write multiple queries chaining upto 6 steps makes 6 queries instead of one. example,

select  t.enrollment*100 total_figure, floor(total_figure % 10) new_variable, case     when new_variable > 7 'typea'     else 'irrelevant' end validity my_table t limit 10; 

this works fine in mysql not in hive. want perform in single query. hive throws error total_figure not valid column of table. appreciated, thanks!


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -