SELECT 买家ID FROM orderUNION SELECT 卖家ID FROM order
select count( distinct( ids) ) from (select 买家ID ids from order union select 卖家ID from order);