>>>>>select max(mRating) as MaxRating, >>>>>RIGHT(max(cast(mRating as C(20)) + CAST(mIndex as C(14))),14) as WhenMaxRatingHappened, >>>>>LEFT(CAST(mIndex as C(14)),6) AS YearMonth >>>>>FROM Tab1 >>>>>GROUP BY 3>>>>
>>>>SumMax's YYMM >>>>20.5 201301 >>>>19.2 201302 >>>>>>>>
>>>>MaxT1 Max T2 SumMax's YYMM >>>>5.6 4.1 9.7 201301 >>>>2.4 1.3 3.7 201302 >>>>>>>>
>>>>select ; >>>>t1.RatingMax as t1MAX,; >>>>t2.RatingMax as t2MAX,; >>>>NVL(T1.RatingMax,0) + NVL(T2.RatingMAX,0) as SumMAXs, ; >>>>NVL(T1.yyMMddhh, T2.yyMMddhh) AS yyMMddhh ; >>>>FROM; >>>>T1 ; >>>>FULL JOIN ; >>>>T2 ; >>>>ON T1.yymmddhh = T2.yymmddhh >>>>>>>
>>select max(mRating) as MaxRating; >>RIGHT(max(cast(mRating as C(20)) ; && contains unrecognized key word ?? >>+; >>CAST(mIndex as C(14))),14) ; >>as ; >>WhenMaxRatingHappened; >>LEFT(CAST(mIndex as C(14)),6) AS YearMonth; >>FROM Tab1; >>GROUP BY 3 >>>
select ; t1.RatingMax as t1MAX,; t2.RatingMax as t2MAX,; t3.RatingMax as t3MAX,; NVL(T1.RatingMax,0) + NVL(T2.RatingMAX,0) + NVL(T3.RatingMAX,0)as SumMAXs, ; NVL(T1.yyMMddhh, T2.yyMMddhh, T3.yyMMddhh) AS yyMMddhh ; FROM; T1 ; FULL JOIN ; T2 ; &&& how do I add in T3 and T4, etc. ON T1.yymmddhh = T2.yymmddhh = T3.yymmddhh