The following relation schema: R(A,C), S(A,D), T(X,Y). Primary key attributes bolded
Would like to know why the following two are not equivalent queries
$Q_1 = π_A (σ_{C<10}(R))$ and $Q_2 = σ_{C<10}(π_A(R))$
The answer: $Q_2$ Invalid expression as the selection condition refers to a non-existent attribute. I'm not sure what the answer means. $Q_1$ and $Q_2$ looks similar but $Q_2$ is invalid.
Could anyone provide some values and examples to explain? Thanks!