select by constrains