各位高手,帮个忙解决一下这个问题啊,十分感谢了!!这是一个发贴的表的结构:id(标识列),sid(贴子版块号),ttopic(贴子标题),tcontents(贴子内容),tclickcount(点击次数)问题:显示各版块点击率最高的贴子,结果要求如下id sid topic tcontents tclickcount
3 1 求助! 各位帮个忙.... 1000 (点击率最大的)
3 1 求助! 各位帮个忙.... 1000 (点击率最大的)
from tab t1
where t1.tclickcount=(select max(tclickcount) from tab t2 where t2.id=t1.id)
from tab t1
where t1.tclickcount=(select max(tclickcount) from tab t2 where t2.sid=t1.sid)