Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,9 @@ ou_ids AS (
),
ou_with_descendants_ids AS (
SELECT DISTINCT ou.organisationunitid
FROM organisationunit ou
LEFT JOIN organisationunit parent_ou ON (ou.path LIKE parent_ou.path || '%')
WHERE ou.organisationunitid IN (SELECT organisationunitid FROM ou_ids)
OR parent_ou.organisationunitid IN (SELECT organisationunitid FROM ou_ids)
FROM ou_ids
JOIN organisationunit root USING (organisationunitid)
JOIN organisationunit ou ON ou.path LIKE root.path || '%'
)
SELECT
de.uid AS deid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,9 @@ ou_ids AS (
),
ou_with_descendants_ids AS (
SELECT DISTINCT ou.organisationunitid
FROM organisationunit ou
LEFT JOIN organisationunit parent_ou ON (ou.path LIKE parent_ou.path || '%')
WHERE ou.organisationunitid IN (SELECT organisationunitid FROM ou_ids)
OR parent_ou.organisationunitid IN (SELECT organisationunitid FROM ou_ids)
FROM ou_ids
JOIN organisationunit root USING (organisationunitid)
JOIN organisationunit ou ON ou.path LIKE root.path || '%'
)
SELECT
de.uid AS deid,
Expand Down Expand Up @@ -391,10 +390,9 @@ ou_ids AS (
),
ou_with_descendants_ids AS (
SELECT DISTINCT ou.organisationunitid
FROM organisationunit ou
LEFT JOIN organisationunit parent_ou ON (ou.path LIKE parent_ou.path || '%')
WHERE ou.organisationunitid IN (SELECT organisationunitid FROM ou_ids)
OR parent_ou.organisationunitid IN (SELECT organisationunitid FROM ou_ids)
FROM ou_ids
JOIN organisationunit root USING (organisationunitid)
JOIN organisationunit ou ON ou.path LIKE root.path || '%'
)
SELECT
de.uid AS deid,
Expand Down
Loading