Kylin doesn¹t support this; But you can achieve this with some other ways, like aggregate once more in your app, or send a union query to Kylin, like
SELECT ft.fm ,count(1) as to ,SUM(ft.lmtdf) as obtd FROM STAGE.fsc as ft where ft.sodp IS NOT NULL group by ft.fm Union SELECT ³ALL² as fm ,count(1) as to ,SUM(ft.lmtdf) as obtd FROM STAGE.fsc as ft where ft.sodp IS NOT NULL On 6/17/15, 4:51 PM, "Vineet Mishra" <[email protected]> wrote: >Hi All, > >I am in middle of the requirement where I need to aggregate all the >records >for ALL after group by, so it will be kind of ROLLUP operation where there >will be additional/one more row with addition of all the columns as >aggregated. > >So for example, I am currently getting the records as > >fm,to,obtd >vs,1,5 >o,2,6 >d,3,7 >fv,4,8 > >on my query, > >SELECT >ft.fm >,count(1) as to >,SUM(ft.lmtdf) as obtd >FROM STAGE.fsc as ft >where ft.sodp IS NOT NULL >group by ft.fm > >where as what I am looking for is, > >fm,to,obtd >vs,1,5 >o,2,6 >d,3,7 >fv,4,8 >ALL,10,26 > >So here ALL will be sum of all the records which is basically the ROLLUP >operation. > >Urgent Call! Any quick help would be highly appreciated. > >Thanks!
