SELECT c.AssetClass, SUM(c.MarketValue) AS MVCurrent, SUM(p.MarketValue) AS MVPrior, SUM(c.MarketValue) / SUM(p.MarketValue) AS PercentageVariation,
CASE
WHEN SUM(c.MarketValue) / SUM(p.MarketValue) BETWEEN 0.9 AND 1.1
THEN 'PASS'
ELSE 'FAIL'
END AS Result
FROM [Nov] AS p, [Dec] AS c
;
是否与双表有关?