author, id ,title
a 1 title1
a 2 title2
a 3 title3
b 4 title4
c 5 title5我现在要一个结果就是,查找id最小的author不能重复的以id升序的前3名的怎么写如果您是select distinct author,id,title from table order by id asc limit 3select * from table group by author order by id asc limit 3这两种结果就不要贴了,这两个结果都不对
a 1 title1
a 2 title2
a 3 title3
b 4 title4
c 5 title5我现在要一个结果就是,查找id最小的author不能重复的以id升序的前3名的怎么写如果您是select distinct author,id,title from table order by id asc limit 3select * from table group by author order by id asc limit 3这两种结果就不要贴了,这两个结果都不对
=============================================
这句话貌似理解起来会有歧义,按照你贴出的数据,你想得到什么样的结果?
a 1 title1
b 4 title4
c 5 title5 正确结果应该是这个
SQL code select * from (select * from table order by id asc) as t1 group by author order by id asc limit 3;这个答案就对了