select org.*
from (select x, max(amount) as mx_amt from original group by x) as tmp
left join original as org on org.amount = tmp.mx_amt and org.x = tmp.x
SELECT name_th , t1.nameP , t1.sm_pla_seed_sources , t1.s_pla_plant_area ,
(SELECT GROUP_CONCAT(DATE_FORMAT(date_date,'%d/%m/%Y') ORDER BY date_date) FROM db_data_subdate WHERE data_id = t1.id AND date_type = 1 GROUP by data_id) as date_sapling,
(SELECT GROUP_CONCAT(DATE_FORMAT(date_date,'%d/%m/%Y') ORDER BY date_date) FROM db_data_subdate WHERE data_id = t1.id AND date_type = 2 GROUP by data_id) as date_plant,
max(t1.last_update) as time ,
t1.sm_pla_plant_note
FROM db_list_centers
LEFT JOIN
(SELECT sv.name_th AS nameP ,
dc.sm_cor_centers ,
dd.sm_pla_seed_sources ,
dd.s_pla_plant_area ,
DATE_FORMAT(dd.last_update ,'%Y/%m/%d' '%H:%i:%S' ) AS last_update ,
dd.id ,
dd.sm_pla_plant_note
FROM db_data_cor dc, db_seed_varieties sv, db_data_data dd
WHERE DC.id=DD.cor_id AND dc.sm_cor_year= 2560 AND dd.type=1 AND dc.sm_cor_seed_varieties=sv.id
AND dc.sm_cor_season =1 ) AS t1 ON db_list_centers.id = t1.sm_cor_centers GROUP BY NAME_TH