查詢數據表中相同最新的記錄,最新記錄確定是主鍵序列3d
SELECT a1.* FROM ( SELECT a.message_id, max( _id ) _id FROM dbm_message a GROUP BY a.message_id ) a2 LEFT JOIN dbm_message a1 ON a2.message_id = a1.message_id AND a2._id = a1._idblog