authorname rq qdsj xbsj
乌玉兰 2011-07-04 2011-07-04 09:00:11
乌玉兰 2011-07-04 2011-07-04 16:26:00查出结果:authorname rq qdsj xbsj
乌玉兰 2011-07-04 2011-07-04 09:00:11 2011-07-04 16:26:00
mysql语句查询
乌玉兰 2011-07-04 2011-07-04 09:00:11
乌玉兰 2011-07-04 2011-07-04 16:26:00查出结果:authorname rq qdsj xbsj
乌玉兰 2011-07-04 2011-07-04 09:00:11 2011-07-04 16:26:00
mysql语句查询
解决方案 »
- mysql的一些配置参数看看够用吗?
- mysql 中,有一列为自动增长列,我如何取得下一个值
- 关于MySQL+Sphinx的问题.
- 如何按要求增加id值
- 问大家,mysql 的sql语句:select * from tabel where field like '%大%',查出所有的??怎么回事
- 怎么修改一个字段的部分记录
- 不知道怎么说的问题?有图表示!知道的请看看!新手问题,不要笑
- 极菜的问题:MySql的查询语句中的limit是什么意思?
- 求比当前记录 小的,最大 一条记录
- alter tbname drop column后,如何恢复被删除列的数据?
- mysql workbench 中乱码问题
- 【万分着急】MySQL默认安装latin1,然后我插入希腊字母β的时候变成了乱码,如何解决
from 你的表
group by authorname, rq
select a.authorname,a.rq,a.qdsj,b.xbsj from tt a
inner join tt b on a.authorname=b.authorname and a.rq=b.rq and a.qdsj<b.xbsj
authorname rq qdsj xbsj 4个字段
乌玉兰 | 2011-07-04 | 2011-07-04 | 09:00:11
还是只有3个字段
乌玉兰 | 2011-07-04 | 2011-07-04 16:26:00如果3个字段,第三个字段叫sj
select authorname, rq, min(sj) as qdsj , max(sj) as xbsj
from table
group by authorname, rq如果4个字段,那么后面3个日期/时间型字段什么关系
inner join tt b on a.authorname=b.authorname and a.rq=b.rq and a.qdsj<b.qdsj and a.xbsj<b.xbsj
from table1
group by authorname,rq