danneedham
Programmer
Hi All,
I have two tables, one for sales, and one for status. I would like to get the "top" status value PER sales date.
I have tried the following query but its dropping sales dates.
SELECT Sales.StoreID, Sales.Date, Max(Status.StatusDate) AS MaxOfStatusDate, Sum(Sales.Amount) AS SumOfAmount
FROM Sales, Status
GROUP BY Sales.StoreID, Sales.Date
HAVING (((Max(Status.StatusDate))<=[Sales].[Date]));
Does anyone have any ideas how i can acheive this?
I have two tables, one for sales, and one for status. I would like to get the "top" status value PER sales date.
I have tried the following query but its dropping sales dates.
SELECT Sales.StoreID, Sales.Date, Max(Status.StatusDate) AS MaxOfStatusDate, Sum(Sales.Amount) AS SumOfAmount
FROM Sales, Status
GROUP BY Sales.StoreID, Sales.Date
HAVING (((Max(Status.StatusDate))<=[Sales].[Date]));
Does anyone have any ideas how i can acheive this?