[task-201] [mod] sql:calendar_overview:remove grouping

This commit is contained in:
Fenris Wolf 2024-10-27 12:23:03 +01:00
parent e7ba307ab1
commit 0f5dede94d

View file

@ -1,3 +1,7 @@
-- Für gewöhnlich würde man hier gruppieren. Aufgrund des UNIQUE-constraints in "calendar_access_attributed" ist das
-- jedoch nicht nötig, da dadurch für jeden Eintrag in "calendar" mit gegebener "user_id" höchstens ein Eintrag in
-- "calendar_access_attributed" passt und da es ein LEFT OUTER JOIN ist, wird es _genau_ ein Eintrag sein
SELECT SELECT
x.id AS id, x.id AS id,
x.name AS name, x.name AS name,
@ -7,6 +11,4 @@ SELECT
FROM FROM
calendars AS x calendars AS x
LEFT OUTER JOIN calendar_access_attributed AS y ON ((x.id = y.calendar_id) AND (y.user_id = $user_id)) LEFT OUTER JOIN calendar_access_attributed AS y ON ((x.id = y.calendar_id) AND (y.user_id = $user_id))
GROUP BY
x.id
; ;