Skip to content
Advertisement

SQL – find usercode based on latest timestamp

I have a table that look like this:

Table

I would like to make a query that creates another table called “LastUser” which shows the USER that has the last TIME. In the example above that would be record 2 – 053527/dlmk.

It should look something like this:

Any suggestion how I can do this?

Advertisement

Answer

You can use first_value() for this:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement