id | login
------+---------
157 | Ivan
158 | Bob
159 | Lylssy
160 | Wylsy
id | game | players
------+---------+---------
1 | gta | [157, 159]
2 | rpx | [157]
3 | xxx | [159, 157, 158]
4 | zzz | [158, 159, 160]
5 | yyy | [158, 160]
select sg.game
from somegame sg
where sg.players @> (select array(
select p.id
from player p
where lower(p.login) like lower('%yls%')
))