SQL SUM STATEMENT HELP

I have 4 tables that contain data. I need to sum table1, table2,table..4  that hold fields.

ID      FinClass      UB      030      060      090      120      150      151
85      CAID      3264.64      19309      22376      5292      1411      4293      229938
86      CAIDHMO      778.44      1493      1141      0      0      620      11723

I need to add the 3 tables the divide by table 4 totals. Not sure the best method,
something like?
SELECT (Sum(artotal.ub)+Sum(bdtotal.ub)+Sum(WRITEOFFTOTAL.ub))/Sum(maintotal.ub) AS ubcalcFROM ARTOTAL INNER JOIN (BDTOTAL INNER JOIN (WRITEOFFTOTAL INNER JOIN MainTotal ON WRITEOFFTOTAL.FinClass = MainTotal.FinClass) ON BDTOTAL.FinClass = WRITEOFFTOTAL.FinClass) ON ARTOTAL.FinClass = BDTOTAL.FinClass group by maintotal.finclass,maintotal.ub;

I need to display the % by finclass

Solution: SQL SUM STATEMENT HELP

Here's another way of presenting the SQL.  You should develop some consistency in the presentation of your names using upper and lower case.

SELECT (
Sum(ARTotal.ub) + Sum(BDTotal.ub) + Sum(WriteOffTotal.ub)) / Sum(MainTotal.ub) AS UBCalc
FROM ARTotal
INNER JOIN (BDTotal
INNER JOIN (WriteOffTotal
INNER JOIN MainTotal
ON WriteOffTotal.FinClass = MainTotal.FinClass)
ON BDTotal.FinClass = WriteOffTotal.FinClass)
ON ARTotal.FinClass = BDTotal.FinClass
GROUP BY MainTotal.FinClass, MainTotal.ub;

Why is MainTotal.ub in the GROUP BY.  Note you need a space between UBCalc and FROM.