如何获取MySQL中携带各自属性的最大值table

How to get the maximum value of table in MySQL carrying the respective attributes

我有以下 example_table 来自嵌套查询的结果:

id    site_ref     area  
-------------------------------
91    Lake SW       0.23
91    Lake MP       3.89
93    Lake SW       0.56
93    Lake MP       0.05

我想获得每个 id 的最大面积,同时携带相应的 site_ref。 我使用了以下 SQL:

select id,  site_ref, max(area) from example_table  GROUP BY id

我得到的是(错误的site_ref):

id    site_ref     area  
-------------------------------
91    Lake SW       0.56
93    Lake SW       3.89

我想要的是:

id    site_ref     area  
-------------------------------
91    Lake MP       3.89
93    Lake SW       0.56

一种方法是相关子查询:

select et.*
from example_table et
where et.area = (select max(et2.area) from example_table et2 where et2.id = et.id);