(conn: Connection)
| 84 | } |
| 85 | |
| 86 | fn get_hottest_months(conn: Connection) -> WeatherAggResult { |
| 87 | let stmt = conn.prepare( |
| 88 | "SELECT cast(strftime('%Y', date) as int) as theyear, |
| 89 | cast(strftime('%m', date) as int) as themonth, |
| 90 | sum(tmax) as total |
| 91 | FROM nyc_weather |
| 92 | WHERE tmax <> 'TMAX' |
| 93 | GROUP BY theyear, themonth |
| 94 | ORDER BY total DESC LIMIT 10", |
| 95 | )?; |
| 96 | |
| 97 | get_rows_as_month_agg(stmt) |
| 98 | } |
| 99 | |
| 100 | fn get_coldest_months(conn: Connection) -> WeatherAggResult { |
| 101 | let stmt = conn.prepare( |
no test coverage detected