I do the filter, it is necessary to make such request through QueryTrait.
SELECT * FROM attributes WHERE (attributes.count_room BETWEEN 5 AND 999 OR attributes.count_room IN ('1', '5'))` I do not understand how to combine AND and OR in parentheses, (so as not to overlap other filters when OR is executed)
$query->andFilterWhere([ 'or', ['between', 'attributes.count_room', 5, 999], ['attributes.count_room' => $this->count_room], ]);- Vlad Shkuta