logidude90
Programmer
Hi everyone,
I've been trying to write this query for a little while now and just can't get it to work. The simplified table schema looks something like this:
CUSTOMER
--------------
customerID
customerName
customerType
INVOICES
--------------
customerID
AmmountBilled
CUSTOMER_TYPE
--------------
customerType
TypeDescription
What I'm trying to do is get the total number of customer AND the total ammount from invoice grouped by TypeDescription.
Something like:
I can get the ammount total working correctly but not the count(customer)...it always return a number way too large...
Any idea on the type of query I should use?
Thanks in advance!
I've been trying to write this query for a little while now and just can't get it to work. The simplified table schema looks something like this:
CUSTOMER
--------------
customerID
customerName
customerType
INVOICES
--------------
customerID
AmmountBilled
CUSTOMER_TYPE
--------------
customerType
TypeDescription
What I'm trying to do is get the total number of customer AND the total ammount from invoice grouped by TypeDescription.
Something like:
Code:
Customer type # of cust. Ammount($)
Regular customer x y
Foreign x y
... ... ...
Any idea on the type of query I should use?
Thanks in advance!