how to write a correlated query in hive -


can please suggest how can implement correlated query in hive.

in sql able write when tried same in hive giving error.

sql query reference

select m.modelname,(select sale car month='jan' ,    modelid=m.modelid) jan_sale,(select sale car month='feb' ,     modelid=m.modelid) feb_sale,(select sale car month='mar' ,     modelid=m.modelid) mar_sale model m inner join car c     on(c.modelid=m.modelid); 

please suggest.

thanks in advance :)

select m.modelid, m.modelname, c.month, sum(c.sale) sum_sale     

from model m inner join car c on c.modelid=m.modelid group m.modelid, m.modelname, c.month


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -