Ответ на этот набор данных приведен ниже:
`select * from(
select x,count(*) as coun from (
select substr(names,
INSTR(names, ' ', -1, 1)+1) as x
from abc
union all
SELECT SUBSTR(names,
INSTR(names, ' ', 1, 1) + 1,
INSTR(names, ' ', 1, 2) - INSTR(names, ' ', 1, 1) - 1) as x
FROM abc
union all
SELECT SUBSTR(names,1,
INSTR(names, ' ',1 , 1)-1) as x
FROM abc
)
where x is not null and x not in ('1','2','3','4','5','6','7')
group by x
order by coun desc)
where rownum < 4800;'
Ответ: