Removed repeated part of a query.