I am using the following query to get the total sales within a given period.
The query works fine but I need to filter out some of the records.
I have entries which are:-
PAID_IN
PAID_OUT
NSI - (Non Stock Item)
These are different values for each instance but the query uses the same value for each instance in the table. I still need these values reporting but is there a way of handling these within one query?
Keith
Code:
SELECT code,sum(qty),each,sum(qty)*each FROM sales where DATED>=1136160000 and DATED<1136419200 GROUP BY 'code' LIMIT 0, 100
I have entries which are:-
PAID_IN
PAID_OUT
NSI - (Non Stock Item)
These are different values for each instance but the query uses the same value for each instance in the table. I still need these values reporting but is there a way of handling these within one query?
Keith