Skip to content

Commit

Permalink
Fix queries
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspergrom committed Oct 30, 2024
1 parent e874c92 commit 6ad0f9e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export async function fetchMembersWithConflictingWorkExperiences(
FROM "members" m
JOIN "memberOrganizations" mo1 ON m.id = mo1."memberId" AND mo1."deletedAt" IS NULL
INNER JOIN "memberSegmentsAgg" msa ON m.id = msa."memberId" AND msa."segmentId" = '${segmentId}'
LEFT JOIN "memberOrganizations" mo2 ON mo1."memberId" = mo2."memberId" AND mo1."deletedAt" IS NULL
LEFT JOIN "memberOrganizations" mo2 ON mo1."memberId" = mo2."memberId" AND mo2."deletedAt" IS NULL
AND mo1.id != mo2.id
AND (
(mo1."dateStart" < COALESCE(mo2."dateEnd", 'infinity'::timestamp)
Expand Down

0 comments on commit 6ad0f9e

Please sign in to comment.