分组以后查询最新的一条数据
$sql = "SELECT i.operating_system,
i.version_id,
i.update_time,
i.operating_system,
i.version_id,
i.version_name,
i.sdk_info,
i.sdk_name,
i.id,
i.doc_info
FROM
doc_info i
JOIN (
SELECT
operating_system,
version_id,
version_name,
sdk_info,
id,
MAX(update_time) AS update_time
FROM
doc_info
GROUP BY
operating_system,
version_id
) t ON i.operating_system = t.operating_system
AND i.version_id = t.version_id
AND i.update_time = t.update_time and
".$map."order by i.update_time desc";