SELECT COUNT(*) FROM ps_orders o LEFT JOIN ps_order_state os ON os.id_order_state = o.current_state LEFT JOIN ps_carrier c ON c.id_carrier = o.id_carrier WHERE c.name like "%dpdpoland%" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)