How to select the most recent set of dated records from a mysql table

后端 未结 7 1607
我在风中等你
我在风中等你 2020-11-29 01:00

I am storing the response to various rpc calls in a mysql table with the following fields:

Table: rpc_responses

timestamp   (date)
method      (varchar)
id          


        
7条回答
  •  醉梦人生
    2020-11-29 01:15

    i used this,worked for me

    select max(timestamp),method,id from tables where 1 group by method,id order by timestamp desc 
    

提交回复
热议问题