询问:
SELECT
item_descr
,shop_id
,COUNT(item_descr) as times
from [Order]
group by item_descr , shop_id
order by shop_id , times desc
结果:
item_descr shop_id times
product A shop1 5
product B shop1 3
product A shop2 6
product B shop2 2
预期成绩:
item_descr shop1 shop2
product A 5 6
product B 3 2
如何更改查询以达到预期结果?