I need a hand on a query in MS access....Here is a sample dataset I will call table dummydatadate Rain_inches flowersbloomed3/25/1999 0.25 27/5/1985 0.125 04/3/1987 1.2 -9995/2/2001 0.65 -9996/12/2001 0.1 5
I need a yearly average for each field that does not include the -999 values (I have to keep them in the database).Here is the current flawed Query....Select distinct Format$([DummyData].[date],'yyyy') AS [date By Year], (Select Avg(rain_inches) from DummyData where rain_inches > -999) as [Avg_Rain_Inches], (Select Avg(FlowersBloomed) from DummyData where FlowersBloomed > -999) as [Avg_Flowers_Bloomed]from DummyDatagroup by Format$([DummyData].[date],'yyyy')
and Erroneous Data returned is date By Year Avg_Rain_Inches Avg_Flowers_Bloomed1985 0.465 2.333333333333331987 0.465 2.333333333333331999 0.465 2.333333333333332001 0.465 2.33333333333333
Any Ideas on what I need to do to seperate each into a year by year grouping of only that years average?Thanks