我在 Access 数据库中有两个表,[Party] 和 [Invoice]。我想总结一下所有政党的平衡。到目前为止,这是我的查询:
select
Party.AccountCode,
Party.AccountDescription,
OpeningBalance+sum(invoiceAmount) as balance,
invoiceDate
from Party,Inovoice
where party.accountCode=Inovice.AccountCode
and invoiceDate>=01-01-2013
and invoiceDate<=30-06-2013
group by
Party.AccountCode,
Party.AccountDescription,
invoiceDate
此查询仅返回出现在 [Invoice] 表中的两方的余额:TOM 和 JHONS。我想显示所有 4 方的余额: