select gh,name,min(time) as first_time,max(time) as end_time from test group by gh,name
解决方案 »
- spring 配置文件 版本声明
- getRequest().setAttribute和getRequest().getsession.setAttribute 有区别吗
- 怎么把网上的帮助文档下载下来
- 百分求助!如何查看别人写好的ActiveX控件中的方法和属性?
- 为什么传过来的是空值?
- 关于文件下载的问题
- 请高手指教这是什么错误 description The server encountered an internal error () that prevented it from fulfilling this request.
- 多图层读数据。。。。。
- 根据ACCESS的日期纪录定时发送邮件
- 下载了Tomca之后,不知道怎么安装。???????????????
- 我在weblogic8.1下配置了一个连接池的问题!
- 你用什么编辑JSP
主要我觉得name是会重复,sql就有问题了
(select min(test2.time)
from test as test2
where test1.name = test2.name) as 起始时间,
(select max(test3.[time])
from test as test3
where test3.name = test1.name) as 结束时间
from test as test1--------------------------------------------------------
这样应该是你要的结果,我试过了,应该没问题