想做一个调取最多评论的文章,写了一个SQL,但是没有办法按评论由多到少排列。
SQL语句如下:
select id,title,keywords,hits,intro,adddate,author,(select count(id) from ks_comment where channelid=1 and infoid=ks_article.id) as commenttotal from KS_Article where tid='20081616974010' and deltf=0 and verific=1 order by hits desc
怎么能让他按评论数排列呢?