Hi Rakesh,
this is an interesting question,
Did you look at the cube and rollup possibilities?
https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation,+Cube,+Grouping+and+Rollup
I believe that you could use this feature to merge your table 1 and table 2
in one single table with a
I have multiple aggregate tables created at different levels of aggregation
grouped by smaller subset of keys. As an example-Table 1 : business_unit,
account, balanceTable 2 : business_unit, balance
When a query is written as select business_unit, balance from table1 where
business_unit='mybu';