don't use subquery for select query if raw was set