remove select condition from query