Consider the SQL query
select distinct p.a1
from p, r1, r2
where p.a1 = r1.a1 or p.a1 = r2.a1
Under what conditions does the preceding query select values of p.a1 that
are either in r1 or in r2? Examine carefully the cases where one of r1 or r2
may be empty.