select * from quote where created < '2020-05-12' and (((is_offer = 0 OR (is_offer is null and is_active = 1)) and
(cart_status is NULL)) OR cart_status = 3) and status='completed';
Как написать этот запрос с моделью коллекции magento. пытался, но не получил идеи для этого (((is_offer = 0 OR (is_offer is null and is_active = 1)) and
(cart_status is NULL)) OR cart_status = 3)
Заранее спасибо.