15428311
非共享数量 40508
select sum(t.fulfillable_quantity)
from (
select tappd.sku,tappd.msku,tappd.source_id,tappd.is_pan_eu,tappd.is_narf,tappd.is_efn,tappi.fulfillable_quantity
from (
select sku,source_id,max(last_buy_price) as last_buy_price,max(ultimate_responsibility) as ultimate_responsibility
from t_sku_bulletin_board
where customer_id=1
and version=575
and sku='15428311'
group by sku,source_id
) as tsbb
inner join t_amz_product_performance_dim as tappd
on tappd.sku=tsbb.sku and tappd.source_id=tsbb.source_id
inner join t_amz_product_performance_inventory as tappi
ON tappd.source_id = tappi.source_id AND tappd.msku = tappi.msku
where tappd.is_pan_eu=0 and tappd.is_narf=0 and tappd.is_efn=0
) t;
共享数量 8751+1097+476
select tappd.sku,tappd.msku,tappd.source_id,tappd.is_pan_eu,tappd.is_narf,tappd.is_efn,tappi.fulfillable_quantity
from (
select sku,source_id,max(last_buy_price) as last_buy_price,max(ultimate_responsibility) as ultimate_responsibility
from t_sku_bulletin_board
where customer_id=1
and version=575
and sku='15428311'
group by sku,source_id
) as tsbb
inner join t_amz_product_performance_dim as tappd
on tappd.sku=tsbb.sku and tappd.source_id=tsbb.source_id
inner join t_amz_product_performance_inventory as tappi
ON tappd.source_id = tappi.source_id AND tappd.msku = tappi.msku
where tappd.is_pan_eu > 0 or tappd.is_narf > 0 or tappd.is_efn > 0
ORDER BY msku;
列表少算了共享关系中的OK-MPK1-5YCA
