Are you trying to get the differences like this?
select cust_id, marketplace,
(count(*) - max(case when marketplace = 'UK' then count(*) end) over (partition by cust_id)) as diff_from_uk
from Customer_Orders co
group by cust_id, marketplace;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…