(conn: Connection)
| 45 | } |
| 46 | |
| 47 | fn get_hottest_years(conn: Connection) -> WeatherAggResult { |
| 48 | let stmt = conn.prepare( |
| 49 | " |
| 50 | SELECT cast(strftime('%Y', date) as int) as theyear, |
| 51 | sum(tmax) as total |
| 52 | FROM nyc_weather |
| 53 | WHERE tmax <> 'TMAX' |
| 54 | GROUP BY theyear |
| 55 | ORDER BY total DESC LIMIT 10", |
| 56 | )?; |
| 57 | |
| 58 | get_rows_as_annual_agg(stmt) |
| 59 | } |
| 60 | |
| 61 | fn get_coldest_years(conn: Connection) -> WeatherAggResult { |
| 62 | let stmt = conn.prepare( |
no test coverage detected