Consider the following SQL queryselect distinct \(a_1, a_2, \ldots, a_n\)
from \(r_1, r_2, \ldots, r_m\)
where PFor an arbitrary predicate P, this query is equivalent to which of the following relational algebra expressions?
- A\(\Pi_{a_1, a_2, \ldots, a_n}\, \sigma_P\,(r_1 \times r_2 \times \cdots \times r_m)\)
- B\(\Pi_{a_1, a_2, \ldots, a_n}\, \sigma_P\,(r_1 \bowtie r_2 \bowtie \cdots \bowtie r_m)\)
- C\(\sigma_P\, \Pi_{a_1, a_2, \ldots, a_n}\,(r_1 \times r_2 \times \cdots \times r_m)\)
- D\(\sigma_P\, \Pi_{a_1, a_2, \ldots, a_n}\,(r_1 \bowtie r_2 \bowtie \cdots \bowtie r_m)\)