次のクエリがあります。
select
(select Sum(Stores) from XYZ where Year = '2013' and Month = '8' )
-
(select Sum(SalesStores) from ABC where Year = '2013' and Month = '8') as difference
上記のクエリでは、Year と Month もテーブルの列です。
同じクエリを実行して、その年のすべての月に対して実行する方法があるかどうか知りたいですか?