Sybase Group by need clarifications

May 12, 2017 at 05:53:42
Specs: Windows 7
Hi Team,

I am using the below query to sum the (TotalAmount) of the group where InvoiceType is having same value and DebitDate is also same to group the records.

I want to sumup the TotalAmount for the records which are having same InvoiceType and same
DebitDate irrespective of StampId . Please help me to verify the query.

SELECT distinct
StampId ,
InvoiceType,
Bank,
Branch,
sum(TotalAmount),
DebitDate
FROM TABLE
GROUP BY InvoiceType,DebitDate ,StampId
ORDER BY Bank,Branch


See More: Sybase Group by need clarifications

Reply ↓  Report •
Related Solutions


Ask Question