• notice
  • Congratulations on the launch of the Sought Tech site

Gets the method of each UserId last record in MySQL table

The following table:

The data is as follows:

Where the userid is not unique, it is required to take a record with the time corresponding to each userid in the table closest to the present.When I first see this condition, I usually think of borrowing a temporary table and adding a main building with the help of join operations.
Give a short method:

Good luck!


Technical otaku

Sought technology together

Related Topic


Leave a Reply