I always thought when using max it would take the maxdate as well as the item that correlates with the max date. I have the following example
taxid eff_dt market
11111 1/1/1990 new hampshire
11111 1/1/1997 delaware
22222 1/1/1993 maine
22222 1/1/2010 new england
There are more rows but this is the way the table looks. If I run this query
SELECT CLEANING3.Taxid, Max(CLEANING3.EFF_DT) AS MaxOfEFF_DT, CLEANING3.market
FROM CLEANING3
GROUP BY CLEANING3.Taxid, CLEANING3.market
HAVING (((CLEANING3.Market)<>"UNKNOWN"));
It will return the same as in the rows. It should be returning
taxid eff_dt market
11111 1/1/1997 delaware
22222 1/1/2010 new england
How do I create the query to do this?
taxid eff_dt market
11111 1/1/1990 new hampshire
11111 1/1/1997 delaware
22222 1/1/1993 maine
22222 1/1/2010 new england
There are more rows but this is the way the table looks. If I run this query
SELECT CLEANING3.Taxid, Max(CLEANING3.EFF_DT) AS MaxOfEFF_DT, CLEANING3.market
FROM CLEANING3
GROUP BY CLEANING3.Taxid, CLEANING3.market
HAVING (((CLEANING3.Market)<>"UNKNOWN"));
It will return the same as in the rows. It should be returning
taxid eff_dt market
11111 1/1/1997 delaware
22222 1/1/2010 new england
How do I create the query to do this?