SELECT * from order_has_status ohs
LEFT JOIN order_status_history osh
ON osh.status_id = ohs.status_id
WHERE osh.status_id IS NULL
SELECT * from order_has_status ohs
LEFT JOIN order_status_history osh
ON osh.status_id = ohs.status_id
WHERE osh.status_id IS NULL