I've facing problem with my MySQL database. I know how to process when I want to do many conditions on one same column.
Example of a table :
No | Letter ------------ 1 | a 5 | b 4 | b 4 | c 5 | b 6 | g 4 | a
Typically, if I want to show the 'No' that has Letter a AND Letter b AND Letter C, this query works well :
SELECT No FROM table WHERE letter IN ('a', 'b', 'c') GROUP BY No HAVING COUNt(*) = 3
But what happens, if in the query, I want to subdivide each letter into many occurences and find the 'No' that could have one occurence of GROUP A(a,x,y,z) AND one occurence of GROUP B(b,w,l) AND one occurence of GROUP C(c,k,j) ?
SELECT No FROM table WHERE letter IN ('a OR x OR y OR z' AND 'b OR w OR l' AND 'c OR k OR j') GROUP BY No HAVING COUNt(*) = 3
I don't know how to do that and I'm lost.