TABLE 1 example data
,SUM(HL) as HL
,SUM(UT) as UL
GROUP BY field1,field2_year
I have example data in table 1 above.
i need to write a query that will return the following:
the trick is that i will not know what the value is in field2_year,
so a simple query like select field1,field2_year where field2_year = 2012 will not work.
i tried using the MAX function but it didnt work as i was hoping it would.