Something
public text v1 · immutableselect order_Id from
(
select order_id , count(*) from cws_move_order
where shipment_id = xyz group by order_id
)AS cmot
inner join
(
select order_id , count(*) AS count from order_split
from order_split os inner join cws_move_order cmo
on cmo.shipment_id = xyz group by order_id
)AS ost
ON cmot.order_id = ost.order_id
AND cmot.count = ost.count