要求取出时间字段最小的值。结果是:
+---------+-----------------+-------------------+------+--------------+--------------------+-------------------+
| id | imei | mac | cid | cpid | package_name | first_access_time |
+---------+-----------------+-------------------+------+--------------+--------------------+-------------------+
| 2683078 | 358848041736737 | 04:46:65:73:51:FE | 821 | 安卓市场 | com.mappn.pad.gfan | 1313732834 |
| 2686496 | 358848041736737 | null | 821 | 安卓市场 | com.mappn.pad.gfan | 1313743980 |
+---------+-----------------+-------------------+------+--------------+--------------------+-------------------+谢谢
解决方案 »
- 关联表的删改,大家是怎么处理的?
- 帮忙看个合并列的问题
- 多表查询问题。。。。一道简单的面试题目。。。
- 请教高人帮小弟看下,修改一句sql
- 怎么不能连接mysql??
- mysqlfront连接mysql服务器出错
- 对信息平台每日监测并较前一天进行比对 如何改良操作方法
- 导入sql文件时,提示[Err] 1146 - Table 'jieyuenew.cmjobcode' doesn't exist
- mysql in子句问题请教
- mysql+keepalived 切换后vip无法被备机接管,反之可以
- mysql 的驱动装不上
- java.sql.SQLException: Value'0000-00-00'异常解决办法
select * from table order by first_access_time desc limit 1
[征集]分组取最大N条记录方法征集,及散分....
from tb A
where not exits (select 1 from tb where mac=A.mac and A.first_access_time>first_access_time )
where not exits (select 1 from tt where a.mac=mac and A.first_access_time>first_access_time )