<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yida.data.school.health.mapper.EduStudentPhysicalExaminationGradeResultsMapper">

    <select id="findLastResults"
            resultType="com.yida.data.common.core.entity.health.EduStudentPhysicalExaminationGradeResults">
    SELECT
	    a.*
    FROM
	    edu_health_student_physical_examination_grade_results a
	    LEFT JOIN edu_health_student_physical_examination_group b ON a.group_id = b.id
    WHERE
	    a.del_flag = 0
	    AND b.`status` = 1
	    AND a.student_id = #{studentId}
	    ORDER BY a.create_date DESC
    </select>
</mapper>
