select
keys.*
from keys.*
join
(select max(issued_at) as issued_at, user_login from keys group by user_login) as last
on
last.user_login = keys.user_login and last.issued_at = keys.issued_at
select
"user_login",
(select key "user_login" from keys as last where keys.id = last.id order by issued_at desc limit 1) as key
from keys
group by "user_login"
SELECT
user_login,
LAST_VALUE(key) OVER(ORDER BY issued_at desc) as last_key
FROM
keys
group by "user_login";
SELECT
user_login,
ARRAY_AGG(key ORDER BY issued_at desc)[0]
FROM
keys
group by "user_login";
ldap_set_option(LDAP_OPT_PROTOCOL_VERSION, 3);
(&(&(objectClass=user)(objectCategory=PERSON))(|(memberof=CN=Access-VPN-BitrixVM,OU=VPN,OU=Access,OU=Groups,OU=CO,DC=company,DC=local)(memberof=CN=Отдел клиентского сервиса \(Call-центр\),OU=Depart,OU=Groups,OU=CO,DC=company,DC=local)))