drd94483 2016-12-04 04:50
浏览 66
已采纳

如何在Mysql中将Top Value字段显示为top

I want to show the college name and num of applications comes to each college and show most application received college as first position in MySQL query?

This is sample table, clg is college name and application_name column must be count() and highest value field must be show on top

enter image description here

My results must be like this....

enter image description here

  • 写回答

2条回答 默认 最新

  • dongqu4443 2016-12-04 05:12
    关注

    try this,

    SELECT `clg`,count(`clg`) AS clg 
    FROM demo 
    GROUP BY `clg` 
    ORDER BY clg DESC 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部