我有一个包含四个字段的表,如下所示,
(UID 是用户 ID)
ID UID MUSIC DATE
1 0 a 2013-10-20
2 0 a 2013-10-21
3 0 a 2013-10-22
4 0 a 2013-10-24
5 0 b 2013-10-11
8 0 b 2013-10-15
10 0 c 2013-10-26
9 0 c 2013-10-25
7 0 c 2013-10-20
6 0 c 2013-10-18
11 0 d 2013-10-10
如何使用 MySQL Query 从上表中检索所有第二高的日期?
预期结果:
ID UID MUSIC DATE
3 0 a 2013-10-22
5 0 b 2013-10-11
9 0 c 2013-10-25
或者
ID UID MUSIC DATE
3 0 a 2013-10-22
5 0 b 2013-10-11
9 0 c 2013-10-25
11 0 d 2013-10-10