1. Tuple variables can be used in SQL, and are defined in the from clause:
select distinct cname, T.loan#
from borrower as S, loan as T
where S.loan# = T.loan#
Note: The keyword as is optional here.
2. These variables can then be used throughout the expression. Think of it as being something like the rename operator.
Finds the names of all branches that have assets greater than at least one branch located in Burnaby.
select distinct T.bname
from branch S, branch T
where S.bcity="Burnaby" and T.assets > S.assets
