How to choose people like apple and banana, as from the data below?
table: MyTable
persons | fruit ----------------------------- P1 Apple P1 Banana P1 Mango P2 Banana P2 Apple P3 Mango P3 Apple
In this case, P1, P2 should be the result.
I tried using
select * from MyTable where fruit in("Apple","Banana");
It is also the result of P3, because P3 also has an apple.
Thanks for any help.
source share