在mysql的一张表中,我想根据Id查询两个字段的总数相加了在根据相加有的大小排序?

2025-04-13 14:40:34
推荐回答(1个)
回答1:

select articleid,count(*) as zongshu from table where typeid in ('评论','留言') group by articleid order by zongshu desc;