I have a buddy that gave me the SQL for the Average part:
"avg(case when TEMPERATURE != -999 then TEMPERATURE else null end) TEMP_AVG,"
What I'm wanting to do is convert this to work in Access and specify the years I want to average (YEAR >=2007 AND YEAR <=2008).
I also want to be able to query a specific year's temperature (YEAR=2008).
Is this possible from one query? I'm pretty sure I'll have to use nested Iff's for the average to work with the null and -999 values, just not sure on the syntax. Also don't know how to work with the year ranges without getting some "not part of an aggregate function" error.