and的优先级高于or
select * from table where Condition1 and Condition2 or Condition3
等价于
select * from table where (Condition1 and Condition2) or Condition3
想要的效果
select * from table where Condition1 and (Condition2 or Condition3)
参考站点: