I'm in need of some help here. Below is an example of what I am trying to do:
table ex.
company_name registered date amount
company1 VA 1/1/2003 5
company2 GA 4/3/2002 10
company1 MD 7/25/2002 4
company1 NC 8/2/2001 9
company3 CA 9/19/2000 25
company3 TX 12/25/2002 100
I need results to look like:
company1 VA, MD, NC 18
company2 GA 10
company3 CA, TX 125
I've been playing around with the coalesce function but can't get it to return just what I need. I will also need to be able to specify date ranges in the where clause too.
Any help would be greatly appreciated.
table ex.
company_name registered date amount
company1 VA 1/1/2003 5
company2 GA 4/3/2002 10
company1 MD 7/25/2002 4
company1 NC 8/2/2001 9
company3 CA 9/19/2000 25
company3 TX 12/25/2002 100
I need results to look like:
company1 VA, MD, NC 18
company2 GA 10
company3 CA, TX 125
I've been playing around with the coalesce function but can't get it to return just what I need. I will also need to be able to specify date ranges in the where clause too.
Any help would be greatly appreciated.