thienphuct > 22-10-15, 04:06 PM
thucgia > 22-10-15, 06:38 PM
(22-10-15, 04:06 PM)thienphuct Đã viết: chỉ em với
id ten don_gia solg
aaa Muối 1 1
bot Bot 100 1
duong Duong 100 1
sua Sua 200 1
id ten don_gia solg stt
sua Sua 200 1 4
select * from
(
select a.*,
(select count(*) from hang where a.id>=id) as stt
from hang as a
)
as t1
where t1.stt=
(
select so_max from
(
SELECT Max(t1.stt) AS so_max
FROM t1
)
as t2
)