MySQL Select all clients that searched for two different items or more
SELECT ip 
FROM my_table
WHERE UPPER(term) NOT LIKE '%BAG%'
GROUP BY ip
HAVING COUNT(ip) &gt; 1;


Normally I would recommend against using a function
in a search (UPPER()), but since the wildcard is there,
the expression is non-sargable in any case!

The db-fiddle is here!