[task-201] [mod] sql:calendar_overview:remove grouping
This commit is contained in:
parent
e7ba307ab1
commit
0f5dede94d
1 changed files with 4 additions and 2 deletions
|
@ -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
|
|
||||||
;
|
;
|
||||||
|
|
Loading…
Add table
Reference in a new issue