select b.store_id,c.store_name,b,show_time,IFNull(count(d.spu_id),0) as 'spu_count',IFNull(count(d.sku_id),0) as 'sku_count' from goblin_self_marketing as a
select b.store_id,c.store_name,b.show_time,IFNull(count(d.spu_id),0) as 'spu_count',IFNull(count(d.sku_id),0) as 'sku_count' from goblin_self_marketing as a
inner join goblin_marketing_zhengzai_relation as b on a.self_market_id = b.self_market_id
inner join goblin_marketing_zhengzai_relation as b on a.self_market_id = b.self_market_id
inner join goblin_store_info as c on c.store_id= b.store_id
inner join goblin_store_info as c on c.store_id= b.store_id
left join goblin_marketing_zhengzai as d on d.self_market_id = b.self_market_id
left join goblin_marketing_zhengzai as d on d.self_market_id = b.self_market_id