我有一点有线问题。
我必须从查询 Likes 和 Collects 中选择两个计数,但是当我添加第二个查询而不是2 likes and 10 collects
我得到10 likes and 10 collects
.
我在这里做错了什么?
select COUNT(tl.ItemLikeId) as a, COUNT(tib.PacketId) as b
from Items i
left join ItemLikes il
on il.ItemId = i.ItemId
left join ItemsInPackets iip
on iip.ItemId = i.ItemId
where i.ItemId = 14591