select user.name, client.name, login.date from login left join client on login.client_id = client.id left join user on login.user_id = user.id where (login.user_id, login.date) in ( SELECT user_id, MAX(date) AS latest_login FROM login GROUP BY user...