Question : distinct sum

I have an Access db something like:

TermID       DispAmount
TNS001         20.00
TNS002         35.00
TNS001         40.00

I need to know how to use an sql distinct sum statement.  What I want is the total DispAmount for each TermID.  eg TNS001 would be 60.00

Answer : distinct sum

One thing that I over looked above was that you also wanted to Count of the Transactions

SELECT TermID,
   SUM(IIF(TranType = "DEP",  DispAmount,0)) AS  Deposit,;
   SUM(IIF(TranType = "WTH",  DispAmount,0)) AS  Withdrawal,;
  COUNT(TranType) AS TransCount;
FROM ReportFormat;
WHERE BETWEEN(Date,dFirstDate,dLastDate);
GROUP   BY TermID


Good Luck

Random Solutions  
 
programming4us programming4us