BMS-HOSxP Community
HOSxP => การเขียน SQL Script => ข้อความที่เริ่มโดย: nukhari ที่ กรกฎาคม 20, 2013, 12:35:54 PM
-
ขอคำสั่ง 10 อันดับ นามสกุล ใน person ที่มีจำนวนมาก ไปหาน้อย หน่อยนะครับ
-
select lname, count(lname) as surname
from person
where lname<>' ' and lname is not null
group by lname
order by surname desc
limit 10
-
select lname, count(lname) as surname
from person
where lname<>' ' and lname is not null
group by lname
order by surname desc
limit 10
ขอบคุณมากมากนะครับ