clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2043189 fiddles created (16648 in the last week).

CREATE TABLE table1 (`id` int, `col1` varchar(6), `name` varchar(6)) ; INSERT INTO table1 (`id`, `col1`, `name`) VALUES ('1', 'a', 'la'), ('2', 'b', 'ria'), ('3', 'w', 'la'), ('4', 'q', 'la'), ('5', 'y', 'ria');
 hidden batch(es)


SELECT id FROM table1 WHERE `name` IN (SELECT `name` FROM table1 GROUP BY `name` HAVING COUNT(`name`) > 2) AND id IN (1,2,3,5)
id
1
3
 hidden batch(es)


SELECT `name` FROM table1 GROUP BY `name` HAVING COUNT(`name`) > 2
name
la
 hidden batch(es)