Q:

Using GROUP BY aggregating SUM on a calculated column

I tried asking this question earlier and now I found a more consolidated way of asking this question. 
I'm working in Access 2007. 
I have a query of the following format in Access:
SELECT RecDate, Weight * YTD / (SELECT SUM(Weight) From Records 
WHERE Class1=t2.Class1 AND Class2 = t2.Class2) as AdjYield
From Records as t2
WHERE Class1="fi" AND Class2="ra"

It gives me the following result
RecDate AdjYield
11/27/2012  4.73704622309864E-05
11/27/2012  0
11/27/2012  -1.87533613791046E-04
11/27/2012  -2.4014644030909E-05
11/27/2012  1.29986083977377E-04
11/27/2012  1.2765190817936E-04
12/11/2012  1.10288780895771E-04
12/11/2012  0
12/11/2012  -1.7463943470934E-04
12/11/2012  -1.51778890534467E-05
12/11/2012  1.47374111584102E-04
12/11/2012  1.45120288096115E-04

Now I want the SUM of each day's calculated AdjYield
RecDate AdJYield
11/27/2012, 1.557E-05
12/11/2012, 3.549E-05

I tried putting SUM() around the Weight * YTD / (SELECT SUM(Weight) From Records WHERE Class1=t2.Class1 AND Class2 = t2.Class2) as AdjYield part and then adding GROUP BY RecDate in the end.  However I get an error saying 

You tried to execute a query that does not include the specified expression "Class1" as part of an aggregate function. 

Any idea on how to do this aggregate correctly? 

A:

Use your existing query as a subquery in another where you GROUP BY RecDate. 
SELECT sub. RecDate, Sum(sub. AdjYield) AS SumOfAdjYield
FROM
    (
        SELECT RecDate, Weight * YTD / (SELECT SUM(Weight) From Records 
        WHERE Class1=t2.Class1 AND Class2 = t2.Class2) as AdjYield
        From Records as t2
        WHERE Class1="fi" AND Class2="ra"
    ) AS sub
GROUP BY sub. RecDate;

