主题:求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
'读者信息表
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