From eada53d19a63b44d6ad4dc0492ad9fa7a1971139 Mon Sep 17 00:00:00 2001 From: mertalev <101130780+mertalev@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:02:18 -0500 Subject: [PATCH] update sql --- server/src/queries/search.repository.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/src/queries/search.repository.sql b/server/src/queries/search.repository.sql index 6637e116990bc..1084375059e52 100644 --- a/server/src/queries/search.repository.sql +++ b/server/src/queries/search.repository.sql @@ -580,6 +580,18 @@ FROM ORDER BY exif.city +-- SearchRepository.getCountries +SELECT DISTINCT + ON ("exif"."country") "exif"."country" AS "country" +FROM + "exif" "exif" + INNER JOIN "assets" "asset" ON "asset"."id" = "exif"."assetId" + AND ("asset"."deletedAt" IS NULL) +WHERE + "asset"."ownerId" IN ($1) + AND "exif"."country" != '' + AND "exif"."country" IS NOT NULL + -- SearchRepository.getStates SELECT DISTINCT ON ("exif"."state") "exif"."state" AS "state"