I have a table storing weatherdata in 5min intervals.

Now I need result with total raindays grouped by Year like this:.

```
2010 100 raindays
2011 120 raindays
2013 90  raindays

```

This is my current query:

```
SELECT date, SUM(rain) FROM $tableName  GROUP BY date HAVING SUM(rain) > 0"; 

```

as expected, this gives me following result:

```
2010-01-02 1.2 (mm)
2010-01-05 1.6 (mm)
2010-02-10 2.6 (mm)

```

How I have to change my query, to have this grouped by year(date) and counted days ?

Thanks all for your help

PM