I have a mysql table like this:
id_doc | id_category
1        a
1        c
1        f
2        a
2        g
3        a
3        b
3        f
4        h
I need a query to extract docs that have categories "a" and "f".
example:
id_doc
1
3
please help me! Thanks