>>>>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 >You're now missing a comma after MaxRating.