select * from table where LENGTH(name) - LENGTH(REPLACE(name, 'a', '')) between 1 and 2 Opdateret til brug mellem.