(conn: Connection)
| 59 | } |
| 60 | |
| 61 | fn get_coldest_years(conn: Connection) -> WeatherAggResult { |
| 62 | let stmt = conn.prepare( |
| 63 | " |
| 64 | SELECT cast(strftime('%Y', date) as int) as theyear, |
| 65 | sum(tmax) as total |
| 66 | FROM nyc_weather |
| 67 | WHERE tmax <> 'TMAX' |
| 68 | GROUP BY theyear |
| 69 | ORDER BY total ASC LIMIT 10", |
| 70 | )?; |
| 71 | |
| 72 | get_rows_as_annual_agg(stmt) |
| 73 | } |
| 74 | |
| 75 | fn get_rows_as_annual_agg(mut statement: Statement) -> WeatherAggResult { |
| 76 | statement |
no test coverage detected