jackyji Posted May 31, 2006 Share Posted May 31, 2006 there is a table:code model remark1 a x2 a x3 a x4 b z5 b z6 c y7 c y8 c yi want to get the record of each model where the code is minimum.the result is:code model remark1 a x4 b z6 c yhow can i write the sql? Link to comment https://forums.phpfreaks.com/topic/10812-i-want-to-get-the-record-of-each-model-where-the-code-is-minimum/ Share on other sites More sharing options...
hvle Posted May 31, 2006 Share Posted May 31, 2006 select code, model, remark from tablename group by model order by code; Link to comment https://forums.phpfreaks.com/topic/10812-i-want-to-get-the-record-of-each-model-where-the-code-is-minimum/#findComment-40417 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.