如何在此查询末尾减去两个总和
SELECT T0.[DocNum],T0.[CardCode], T0.[CardName],
T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price],T0.[DiscSum],
T0.[VatSum], T0.[DocTotal], T1.[LineTotal], T0.[DocStatus]
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
select distinct itemcode,CardCode,CardName,DocTotal,LineTotal from RIN1 , ORIN
Select SUM (linetotal) as ARINVOICE from INV1
Select SUM (LineTotal) as Credittotal from RIN1