我有三个与以下关系相关的表:
"agency" 1-n "agent" 1-n "ad"
(agency has many agents and each agent has many ads)
我想按代理商获取广告计数列表,如下所示:
agency_name | ad_count
---------------------------
agency 1 | 15
agency 2 | 25
agency 3 | 0
甚至会显示 0 个广告的代理机构。这可能吗?非常感谢!