kokila vijayasree Posted May 6, 2019 Share Posted May 6, 2019 SELECT CASE GROUPING(A) WHEN 1 THEN 'Aa' ELSE A END AS RELATIVE_TIME_CATEGORY, S.B AS B, CASE GROUPING© WHEN 1 THEN 'Cc' ELSE C END AS C, SUM(D) AS NBR_of_DFROM Table_A A INNER JOIN Table_B RELTIME ON RELTIME.DTE_YRWK_NR_KPN=A.DTE_YRWK_COLL INNER JOIN Table_C S ON A.COU_STE_ID = S.STE_IDGROUP BY ROLLUP( A, B, C) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now