Fixed #9

Prevented an earlier approach that used a subquery.