Answer the question
In order to leave comments, you need to log in
How to find records in pgsql?
I have two tables:
player
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]
Answer the question
In order to leave comments, you need to log in
select sg.game
from somegame sg
where sg.players @> (select array(
select p.id
from player p
where lower(p.login) like lower('%yls%')
))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question