(conn: Connection)
| 98 | } |
| 99 | |
| 100 | fn get_coldest_months(conn: Connection) -> WeatherAggResult { |
| 101 | let stmt = conn.prepare( |
| 102 | "SELECT cast(strftime('%Y', date) as int) as theyear, |
| 103 | cast(strftime('%m', date) as int) as themonth, |
| 104 | sum(tmax) as total |
| 105 | FROM nyc_weather |
| 106 | WHERE tmax <> 'TMAX' |
| 107 | GROUP BY theyear, themonth |
| 108 | ORDER BY total ASC LIMIT 10", |
| 109 | )?; |
| 110 | |
| 111 | get_rows_as_month_agg(stmt) |
| 112 | } |
| 113 | |
| 114 | fn get_rows_as_month_agg(mut statement: Statement) -> WeatherAggResult { |
| 115 | statement |
no test coverage detected