Any ideas would be well appreciated
I want the sum of the sales of a Salesperson for a specific month i.e. the month before.
Last month:
i.e. Salesperson ££SOLD
1 £800
2 £350
and so fourth for all my sales staff.
Expand|Select|Wrap|Line Numbers
- SELECT DISTINCT CarSales.Sales_Staff_No, (SELECT SUM(CS.Purchased_Price) FROM CarSales AS CS WHERE CS.Sales_Staff_No = CarSales.Sales_Staff_No) AS Sum_Of_Sales, CarSales.Date_Of_Purchase
- FROM CarSales;
All that happens is that it does the sum off all data in the table instead of only the the data relevant 2 the Month...
How do I get the SUM 2 be dependant on the dates of a month.
I use the >=1/10/2006 AND <=31/10/2006. But that does not work, still gives the sum of all data .
Please give sum comments this is doing my head in now