>select ; >NVL(T1.RatingSum,0) + NVL(T2.RatingSum) as TotalRating, ; >NVL(T1.yymmddhh, T2.yymmddhh) AS yyMMddhh ; >FROM ; >( ; >select ; >sum(mRating) as RatingSum, ; >LEFT(mDate,10) as yyMMddhh ; >from Table1 ; >GROUP BY 2 ; && what does Group by 2 mean? >) ; >T1 ; >FULL JOIN ; >( ; >select ; >sum(mRating) as RatingSum, ; >LEFT(mDate,10) as yyMMddhh ; >from Table2 ; >GROUP BY 2 ; && again? >) ; >T2 ; >ON T1.yymmddhh = T2.yymmddhh && use ON instead of WHERE, I guess >Group by 2 means group by the second column (in our case it's computed column without the minutes part). In VFP we can not use computed column in the GROUP BY expression (as in SQL Server), so we have to use the ordinal number of the column.