MySQL Select only one row from each patient diagnosed according the first date

后端 未结 3 804
攒了一身酷
攒了一身酷 2020-12-22 12:50

EDIT

I cannot group by only with patient_id, I will get an error of sql_mode=only_full_group_by...

I

3条回答
  •  误落风尘
    2020-12-22 13:12

    Just keep the group by clause t1.patient_id, t5.date_of_assessment.

    So I read this doc if you don't require order by order by assisment date remove it, or keep the same in group by also.

提交回复
热议问题