From a83de7d688b09c588a101065b628da404e9014c9 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Sun, 16 Sep 2018 17:07:37 +0100 Subject: [PATCH] Added queries for earliest and latest observation dates. --- .../java/uk/co/neviyn/Observations/dao/ObservationDao.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/main/java/uk/co/neviyn/Observations/dao/ObservationDao.java b/backend/src/main/java/uk/co/neviyn/Observations/dao/ObservationDao.java index 3d4b40b..23d68c6 100644 --- a/backend/src/main/java/uk/co/neviyn/Observations/dao/ObservationDao.java +++ b/backend/src/main/java/uk/co/neviyn/Observations/dao/ObservationDao.java @@ -50,4 +50,10 @@ public interface ObservationDao { "AVG(teamwork) as teamwork, AVG(knowledge) as knowledge, date FROM observations GROUP BY date ORDER BY date") @RegisterRowMapper(AverageStats.Mapper.class) List averageObservationScoresByDay(); + + @SqlQuery("SELECT MIN(date) FROM observations") + DateTime earliestEntryDate(); + + @SqlQuery("SELECT MAX(date) FROM observations") + DateTime latestEntryDate(); }