Good day! There is such a table:
+----+-----+------+ | id | uid | chat | +----+-----+------+ | 3 | 1 | 2 | | 6 | 1 | 3 | | 1 | 6 | 1 | | 4 | 6 | 2 | | 2 | 9 | 1 | | 5 | 9 | 3 | +----+-----+------+ How to choose chat, where uid is 1 and 6? At the same time, another query may be on the sample, where uid is equal to 1,6,9,11;