Answer the question
In order to leave comments, you need to log in
How to compose SQL, is there a dialogue with such a composition of participants?
Terrible blunt, the work got up.
The task seems to be trivial, but the brain does not turn, the community's help is needed.
There is a table with a list of dialogue participants:
tbl_participants
id, user_id, dialog_id
At the input there is a list of user_id (it can contain two or more id)
It is necessary to determine from this list whether there is already a dialogue with exactly this composition of participants.
Those. no more, no less, namely with these users.
I know how to solve this problem with several queries, but something tells me there is a more elegant solution.
Saturday night - it's time to work!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question