S
Statsman
I've got a table that has:
ID Postsector Effective Date Contents Area Buildings Area
1 AB1 1 01/01/10 10 6
2 AB1 1 01/04/10 8 10
3 NR2 2 01/01/10 12 13
4 NR2 2 01/04/10 8 8
etc, etc.
I want the latest Contents & Building Areas for each postsector.
i.e. Postsector Effective Date Contents Area Buildings Area
AB1 1 01/04/10 8 10
NR2 2 01/04/10 8 8
I tried a query that did Group By on Postsector & Max on Effective
Date.
I'm then forced to choose something for the Contents Area & the
Buildings Area.
But if I choose Last I don't get the last entry in the table but the
highest number.
Please can someone advise what the query should look like?
Thanks in advance.
ID Postsector Effective Date Contents Area Buildings Area
1 AB1 1 01/01/10 10 6
2 AB1 1 01/04/10 8 10
3 NR2 2 01/01/10 12 13
4 NR2 2 01/04/10 8 8
etc, etc.
I want the latest Contents & Building Areas for each postsector.
i.e. Postsector Effective Date Contents Area Buildings Area
AB1 1 01/04/10 8 10
NR2 2 01/04/10 8 8
I tried a query that did Group By on Postsector & Max on Effective
Date.
I'm then forced to choose something for the Contents Area & the
Buildings Area.
But if I choose Last I don't get the last entry in the table but the
highest number.
Please can someone advise what the query should look like?
Thanks in advance.