回 帖 发 新 帖 刷新版面

主题:求SQL语句一条?(解决者60分)

求SQL,想了很久了,卡住了[em8]
'读者信息表
ReaderID               ReaderBookTime
R1000051001    2005-10-1
R1000051002    2005-10-2
R1000051009    2005-10-9
R1000051026    2005-10-26
R1000051031    2005-10-31
R1001051001    2005-10-1
R1001051031    2005-10-31
R1001051002    2005-10-2
R1002051001    2005-10-1
对时间分组,按照时间,读者编号降序排列
所需结果:
ReaderID          ReaderBookTime
R1001051031    2005-10-31
R1000051031    2005-10-31
R1000051026    2005-10-26
R1000051009    2005-10-9
R1001051002    2005-10-2
R1000051009    2005-10-2
R1002051001    2005-10-1
R1001051001    2005-10-1
R1000051001    2005-10-1

回复列表 (共1个回复)

沙发

select * from tablename

order by ReaderBookTime desc ,ReaderId desc

我来回复

您尚未登录,请登录后再回复。点此登录或注册