T
Tracy
How do I write a select statement that will return a total
from a column with a condition? This is the situation I
have an invoice table. The items which are taxable have a
invoice.detail_type="M". I want to be able to run a query
that for any given invoice returns the total amount in $
of the line items that are type "M" and those that are not.
Invoice 30538 has 7 line items, 5 of which are
detail_type "M" for a total of 575.35, the other 2 line
items total 387.23. I want my query to return just those
two numbers.
Thanks in advance
from a column with a condition? This is the situation I
have an invoice table. The items which are taxable have a
invoice.detail_type="M". I want to be able to run a query
that for any given invoice returns the total amount in $
of the line items that are type "M" and those that are not.
Invoice 30538 has 7 line items, 5 of which are
detail_type "M" for a total of 575.35, the other 2 line
items total 387.23. I want my query to return just those
two numbers.
Thanks in advance