CREATE table toms(
id int primary key auto_increment,
name varchar(20) not null,
price int
)
drop table price1;
insert into toms values(1,'tom', 10);
insert into toms values(2,'jerry', 20);
insert into toms values(3,'mary', 10);
insert into toms values(4,'john', 30);
insert into toms values(5,'jack', 40);
insert into toms values(6,'jack', 20);
select price
from (select all(id), price,count(*)
from toms
group by price
having count(*)=1 order by price limit 0,1 ) as aaa;