More work on the query.