- The subquery computes sum(unpaid) for each customer,
and names that computation with a new column
name: sum_unpaid
- The subquery is inside from ( ... ) q. SQL requires a name for each
table in the from clause, so we give it one: q.
- The outer query restrict sum_unpaid:
where sum_unpaid > 100