Hi! Could we please enable some services and cookies to improve your experience and our website?
CREATE TABLE tbl (id int, userid int);
INSERT INTO tbl VALUES (1 , 1), (2 , 5), (3 , 5), (4 , 5), (5 , 9);
SELECT userid
FROM tbl
GROUP BY userid
HAVING COUNT(userid) = 1;