ASP问题:分类统计问题求教(50分)满意+(50)

比如:+------------+---------------+---------------------------+|ID|Classid|Title|+-----... 比如:
+------------+---------------+---------------------------+
| ID | Classid | Title |
+------------+---------------+---------------------------+
| 1 | 3 | TitleString |
+------------+---------------+---------------------------+
| 2 | 3 | TitleString |
+------------+---------------+---------------------------+
| 3 | 3 | TitleString |
+------------+---------------+---------------------------+
| 4 | 3 | TitleString |
+------------+---------------+---------------------------+
| 5 | 3 | TitleString |
+------------+---------------+---------------------------+
| 6 | 3 | TitleString |
+------------+---------------+---------------------------+
| 7 | 1 | TitleString |
+------------+---------------+---------------------------+
| 8 | 2 | TitleString |
+------------+---------------+---------------------------+
| 9 | 4 | TitleString |
+------------+---------------+---------------------------+
| 10 | 3 | TitleString |
+------------+---------------+---------------------------+
| 11 | 3 | TitleString |
+------------+---------------+---------------------------+
| 12 | 3 | TitleString |
+------------+---------------+---------------------------+
| 13 | 3 | TitleString |
+------------+---------------+---------------------------+
| 14 | 3 | TitleString |
+------------+---------------+---------------------------+
| 15 | 5 | TitleString |
+------------+---------------+---------------------------+
| 16 | 3 | TitleString |
+------------+---------------+---------------------------+
把在classid中占比重大的数据统计出来,结果:3
求一算法,感谢!
展开
 我来答
womanv
2008-04-18 · TA获得超过818个赞
知道小有建树答主
回答量:898
采纳率:0%
帮助的人:1048万
展开全部
SELECT top 1 COUNT(*) AS num FROM tablename GROUP BY classid ORDER BY num DESC

没验证过。。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式