Just by observation, it seems to be the following, but more often than not, I don't trust my observations without a lot of testing.WHERE
interview.id IS NULL
AND
(
case.case_item IS NULL
OR
case.case_item = 'dbv'
OR
(
case.case_item IN ('dub', 'dim')
AND
case.interview_office IS NULL
AND
case.til = -1
)
)