I have this query which works perfectly:
SELECT cp.*
FROM CustPrimaryQ cp
JOIN Customer c ON cp.CxID = c.CustomerID
JOIN SacCode sc ON sc.SacCode = c.SacCode
WHERE sc.ResellerCorporateID = 392
However I am trying to modify it to calculate an average.
Each row of the CustPrimaryQ table has a field called QScore and it's this field I want to find out the total average of.
In other words if there are 10 rows in CustPrimaryQ I want the Average QScore for the 10 rows.
Any help would be much appreciated.