My table has three columns [ID], [YEAR], [MALES] and there can be multiple MALES values over multiple YEAR values for any given ID.
EX.
[ID] [YEAR] [MALES]
1 2010 10
1 2011 20
1 2011 35
1 2011 0
1 2012 25
1 2012 10
2 2010 5
2 2011 2
2 2011 11
2 2011 12
2 2012 0
2 2012 10
I need to query the maximum YEAR and the maximum MALES value for that YEAR for each ID. So the result for the example above would be:
[ID] [YEAR] [MALES]
1 2012 25
2 2012 10
MAX(Year)?