2025-08-16 11:09:17 +0300 MSK

The Latest Login in 2020

Code

SELECT 
    user_id, 
    MAX(time_stamp) AS last_stamp
FROM 
    Logins 
WHERE 
    time_stamp >= '2020-01-01'
    AND time_stamp < '2021-01-01'
GROUP BY 
    user_id