From da446c5073c47a5eec36ef4d9e369b7f012bed19 Mon Sep 17 00:00:00 2001 From: philipp Date: Sat, 6 Apr 2024 21:17:23 +0200 Subject: [PATCH] show boats w/o km --- src/model/stat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/stat.rs b/src/model/stat.rs index 10384b9..7199ce8 100644 --- a/src/model/stat.rs +++ b/src/model/stat.rs @@ -30,7 +30,7 @@ impl BoatStat { SELECT boat.id, location.name AS location, - CAST(strftime('%Y', arrival) AS INTEGER) AS year, + CAST(strftime('%Y', COALESCE(arrival, 'now')) AS INTEGER) AS year, CAST(SUM(COALESCE(distance_in_km, 0)) AS INTEGER) AS rowed_km FROM boat