Home > database >  How do you write the SQL
How do you write the SQL

Time:11-19



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 id
  • Related