碰到一个“分组查询,每组取10条记录”的问题,求解。 表T字段 a、b、c、d、eb为int型条件语句 b in (1,2,3)排序语句 c desc,d asc现在要在b的每种情况下取10条,这查询语句该怎么写。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select *from t txwhere 10>(select count(*) from t where b=tx.b and( c> tx.c or (c=tx.c and d>tx.d)))and b in (1,2,3)order by b,c desc ,d desc 分组取最大N条记录方法征集http://topic.csdn.net/u/20091231/16/2f268740-391e-40f2-a15e-f243b2c925ab.html 请问,一个text型的字段被改成了longtext,数据库空间会增加吗? postgresql中的数据文件是什么扩展名? MySQL中怎么查询一张表的列数?? 源码安装mysql5.1发现不支持innodb ,如何配置才能让他支持 xp下 用navicat访问 red hat虚拟机上的mysql 这个SQL怎么写 关于上传,简单!高分酬谢!请有经验的朋友帮我看看!急!谢谢! mysql中怎么随机生成1000条不重复的数据 【求助】用java语言对数据库的调用 mySQL安装时配置错误,快绝望了,求各位大神指导 求写一查询语句 查询用户的二次登陆
from t tx
where 10>(select count(*) from t where b=tx.b and( c> tx.c or (c=tx.c and d>tx.d)))
and b in (1,2,3)
order by b,c desc ,d desc
http://topic.csdn.net/u/20091231/16/2f268740-391e-40f2-a15e-f243b2c925ab.html