Suppose I have a table
id value ------ --------- 10 123 10 422 11 441 11 986
With mysql 8+ or mariadb 10.2+, you would use the count window function:
select id, value from ( select id, value, count(id) over (partition by id) as num_values from sometable ) foo where num_values > 1;