I insert a record every hour on my desk. Now I need to get the latest record for every day in the last 30 days.
Here is my table:
pl_scores: { score_id: 'BIGINT(255) PRIMARY KEY AUTO_INCREMENT' , pid: 'INT(100)' , score: 'INT(255)' , rank: 'INT(50)' , city_cnt: 'INT(10)' , updatedAt: 'DATETIME' }
Since there are 24 entries for each day, I donβt understand how to get the last one for that day only. Any help would be appreciated.
source share