The following results;
Id tname ttime
Beijing 2020-12-02 17:02:43
1 the 17:02:03 2020-11-11 in Shanghai
CodePudding user response:
Select id, tname, Max (ttime) ttime from tableName group by tname order by desc idCodePudding user response:
Select id, tname, Max (ttime) ttime from tableName group by tname order by desc id