MySQL is not my fad, so I didn’t even know how to write the title of the post correctly ... In general, the point is this. For example, there is one table with two fields F1 and F2
We search in the field F2 , we get DISTINCT F1 . If the parameter is one, for example A , then we get three entries at the output: 7 , 12 , 5 . But if there are two parameters A and B , then how to make a request to pull out only two records 7 and 5 . We eliminate 12 , because does not have parameter B in it? So, as I build a query - this can not naturally be achieved.
SELECT DISTINCT F1 FROM table WHERE F2 IN ('A','B')