select a.* from book a right join (
select min(id) id from book group by title) b on b.id = a.id
where a.id is not null
或者
select * from table_a where id in (select min(id) from table_a group by a)
min() 或者max()是取分组中选第一条符合的记录还是选最后一条。
select a.* from book a right join (
select min(id) id from book group by title) b on b.id = a.id
where a.id is not null
或者
select * from table_a where id in (select min(id) from table_a group by a)
min() 或者max()是取分组中选第一条符合的记录还是选最后一条。