Only get the latest 10 trap collections

Otherwise the page gets really swamped
This commit is contained in:
Eli Ribble 2025-11-21 16:28:03 +00:00
parent d3b9d34bd2
commit b7318ae973
No known key found for this signature in database
12 changed files with 304 additions and 27 deletions

View file

@ -1,6 +1,6 @@
-- TrapCountByLocationID
SELECT
td.loc_id AS trapdata_globalid,
td.globalid AS trapdata_globalid,
td.enddatetime AS trapdata_enddate,
COALESCE(SUM(sa.females), 0) AS total_females,
COALESCE(SUM(sa.males), 0) AS total_males,
@ -13,5 +13,5 @@ WHERE
td.organization_id = $1
AND td.loc_id IN ($2)
GROUP BY
td.globalid, td.enddatetime;
td.globalid, td.loc_id, td.enddatetime;