Relational Algebra & Calculus

Answer & solution
Official answer: 2
Approach: First match rows using the join condition, then test the selection condition for each resulting pair.
1. At A=10, R's B=20 matches S's C=90. The equijoin row is (R.A,B,S.A,C)=(10,20,10,90), and 20<90 is true. Below, write the equal A columns once as shorthand (A,B,C).
2. At A=30, there are two R rows and one S row. They produce (30,40,45) and (30,50,45). The first passes 40<45; the second fails 50<45.
3. R's A=20 and A=50 rows find no matching S row. S's A=40 row finds no R partner. An ordinary inner equijoin does not retain these unmatched rows.
4. The join therefore creates three tuples, of which exactly two survive the B<C filter.
Answer: 2. Repeated A values in R must not be collapsed: each matching row contributes its own joined tuple before selection.