From 8c24bb7014bd9b2c1daa8ee77af0099f5db29f7e Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Sun, 26 Jan 2025 21:43:39 -0600 Subject: [PATCH] sql --- server/src/queries/asset.repository.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/queries/asset.repository.sql b/server/src/queries/asset.repository.sql index 948f7dd114..6a5c8f2c20 100644 --- a/server/src/queries/asset.repository.sql +++ b/server/src/queries/asset.repository.sql @@ -59,12 +59,14 @@ select json_agg("res") as "assets" from "res" +where + "localDateTime" >= $8 group by ("localDateTime" at time zone 'UTC')::date order by ("localDateTime" at time zone 'UTC')::date desc limit - $8 + $9 -- AssetRepository.getByIds select @@ -258,6 +260,7 @@ with where "assets"."deletedAt" is null and "assets"."isVisible" = $2 + and "assets"."localDateTime" >= $3 ) select "timeBucket",