Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group By / Totals

Status
Not open for further replies.

ksbrace

Programmer
May 13, 2000
501
US
I am trying to get some totals....I have assignedto, portfolio, paymentamount, status as columns.

What I have is:
Code:
select assignedto, portfolio, paymentamount "total payment money" from payments
 group by assignedto;

But that doesnt' give me the total amount of payment money for each portfolio for each collector.

I'm looking to see something like

collector1 portfolio1 4,500.00
collector1 portfolio2 3,000.00
collector2 portfolio1 2,000.00



any help would be great!


 
got it..
select assignedto, portfolio, sum(paymentamount)"total payment money" from payments
group by assignedto,portfolio;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top