请教SQL语句 - MS-SQL Server / 基础类
Card_dateTime CardNo Mc_ID
2010-05-28 16:15:00 0002001001 08
2010-05-28 16:16:00 0002001001 08
2010-05-28 16:17:00 0002001001 08
2010-05-28 16:17:00 0002001014 08
2010-05-28 16:19:00 0002001021 08
2010-05-28 16:20:00 0002001021 08
2010-05-28 16:20:00 0002001021 08
2010-05-28 16:22:00 0002001021 08
2010-05-28 16:22:00 0002001021 08
2010-05-28 16:24:00 0002002003 08
2010-05-28 16:27:00 0002002003 08
2010-05-28 17:04:00 0002002005 08
2010-05-28 17:04:00 0002002005 08
2010-05-28 19:07:00 0002002005 08
2010-05-28 20:13:00 0002002006 08
2010-05-28 20:27:00 0002002018 08
2010-05-28 20:28:00 0002002018 08
2010-05-28 20:29:00 0002002018 08
2010-05-28 20:29:00 0002002024 08
2010-05-28 20:29:00 0002002024 08
2010-05-28 20:29:00 0002002024 08
2010-05-28 20:30:00 0002002024 08
2010-05-28 20:30:00 0002002024 08
2010-05-28 20:31:00 0002002033 08
2010-05-28 20:31:00 0002002033 08
2010-05-28 20:32:00 0002002038 08
2010-05-28 20:32:00 0002002038 08
2010-05-28 20:32:00 0002002041 08
2010-05-28 20:32:00 0002002041 08
2010-05-28 20:33:00 0002002041 08
2010-05-28 20:33:00 0002002041 08
请教一条SQL语句,要求查询出所有记录剔除3分钟内的刷卡记录(以Card_dateTime最小为准),只输出一次,例如
2010-05-28 16:15:00 0002001001 08
2010-05-28 16:16:00 0002001001 08
2010-05-28 16:17:00 0002001001 08
只输出 2010-05-28 16:1
相关问答:
可能因为工作的原因 接触数据库这块比较少,之前都是做程序这块,数据库这块都有专门的人来做 分工都很明细 所以对数据库这一块完全不了解。前段时间 去面试了几家公司 几乎都是在数据库这块挂掉的 连个简单的SQ ......
如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP
参考:http://hi.baidu.com/toiota ......
select o_customer,o_price from orders having o_price >=avg(o_price)
select o_customer,o_price from orders where o_price >=(select avg(o_price) from orders)
我感觉没有区别啊,怎么在mysql会有 ......
SQL code:
rs.open "select * from guide where city_name='北京' order by pai desc",conn,1,1
do while not rs.eof or rs.bof
。。
。。
。。
rs.movenext
loop
这个sql语句在wap站里 本身有 ......