DECLARE @teachers TABLE ([LastName] NVARCHAR(255) NOT NULL);
INSERT INTO @teachers
VALUES
(N'Холстинин'),
(N'Пирожков'),
(N'Пугачева'),
(N'Цой');
DECLARE @vowels TABLE ([Letter] NCHAR(1) NOT NULL);
INSERT INTO @vowels VALUES
(N'а'),
(N'о'),
(N'и'),
(N'е'),
(N'ё'),
(N'э'),
(N'ы'),
(N'у'),
(N'ю'),
(N'я');
SELECT [t].[LastName]
FROM @teachers [t]
CROSS JOIN @vowels [v]
GROUP BY [t].[LastName]
HAVING SUM(LEN([t].[LastName]) - LEN(REPLACE([t].[LastName], [v].[Letter], ''))) > 3;