📅  最后修改于: 2022-03-11 15:04:55.096000             🧑  作者: Mango
SELECT q.* FROM (
SELECT patient . * , visit.uid AS visit_uid
FROM patient
LEFT JOIN visit ON patient.uid = visit.patient_id
ORDER BY visit_uid DESC
) q GROUP BY q.uid ORDER BY q.visit_uid DESC
LIMIT 0 , 10