eg:根据新闻数量排序所有单位

 

select w_title,w_domain,b.NewsCount
from website
left join
(select  menu.m_id as mm_id,count(1) as NewsCount
from web_news
left join menu on
 menu.id=web_news.mn_id
where menu.m_id<>1
group by menu.m_id
)b
on website.m_id=b.mm_id
order by b.NewsCount desc

相关文章:

  • 2022-12-23
  • 2021-08-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-01-27
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
相关资源
相似解决方案