#PostgreSQL, 246(削除) 246 (削除ここまで), 245 bytes#
EDIT:
Handling ':
WITH z AS(SELECT DISTINCT*,COUNT(*)OVER(PARTITION BY t,m)c FROM i,regexp_split_to_table(translate(lower(t),'.,"!',''),E'\\s+')m)
SELECT t,CASE WHEN COUNT(*)>1 THEN '' ELSE MAX(m)END
FROM z WHERE(t,c)IN(SELECT t,MAX(c)FROM z GROUP BY t)
GROUP BY t
Output:
╔═══════════════════════════════════════════════════════════════════════════════════════════════╦═══════════════╗
║ t ║ max ║
╠═══════════════════════════════════════════════════════════════════════════════════════════════╬═══════════════╣
║ a a a b b b c ║ ║
║ The old-fashioned man ate an old-fashioned cake. ║ old-fashioned ║
║ IPv6 looks great, much better than IPv4, except for the fact that IPv6 has longer addresses. ║ ipv6 ║
║ This sentence has no most frequent word. ║ ║
║ "That's... that's... that is just terrible!" he said. ║ that's ║
║ The man walked down the road. ║ the ║
║ Slowly, he ate the pie, savoring each delicious bite. He felt like he was truly happy. ║ he ║
╚═══════════════════════════════════════════════════════════════════════════════════════════════╩═══════════════╝
#PostgreSQL, 246 bytes#
#PostgreSQL, (削除) 246 (削除ここまで), 245 bytes#
EDIT:
Handling ':
WITH z AS(SELECT DISTINCT*,COUNT(*)OVER(PARTITION BY t,m)c FROM i,regexp_split_to_table(translate(lower(t),'.,"!',''),E'\\s+')m)
SELECT t,CASE WHEN COUNT(*)>1 THEN '' ELSE MAX(m)END
FROM z WHERE(t,c)IN(SELECT t,MAX(c)FROM z GROUP BY t)
GROUP BY t
Output:
╔═══════════════════════════════════════════════════════════════════════════════════════════════╦═══════════════╗
║ t ║ max ║
╠═══════════════════════════════════════════════════════════════════════════════════════════════╬═══════════════╣
║ a a a b b b c ║ ║
║ The old-fashioned man ate an old-fashioned cake. ║ old-fashioned ║
║ IPv6 looks great, much better than IPv4, except for the fact that IPv6 has longer addresses. ║ ipv6 ║
║ This sentence has no most frequent word. ║ ║
║ "That's... that's... that is just terrible!" he said. ║ that's ║
║ The man walked down the road. ║ the ║
║ Slowly, he ate the pie, savoring each delicious bite. He felt like he was truly happy. ║ he ║
╚═══════════════════════════════════════════════════════════════════════════════════════════════╩═══════════════╝
#PostgreSQL, 245246 bytes#
WITH z AS(SELECT DISTINCT*,COUNT(*)OVER(PARTITION BY t,m)c FROM i,regexp_split_to_table(translate(lower(t),'.,"!'"''',''),E'\\s+')m)
SELECT t,CASE WHEN COUNT(*)>1 THEN '' ELSE MAX(m)END
FROM z WHERE(t,c)IN(SELECT t,MAX(c)FROM z GROUP BY t)
GROUP BY t
Output:
╔═══════════════════════════════════════════════════════════════════════════════════════════════╦═══════════════╗
║ t ║ max ║
╠═══════════════════════════════════════════════════════════════════════════════════════════════╬═══════════════╣
║ a a a b b b c ║ ║
║ The old-fashioned man ate an old-fashioned cake. ║ old-fashioned ║
║ IPv6 looks great, much better than IPv4, except for the fact that IPv6 has longer addresses. ║ ipv6 ║
║ This sentence has no most frequent word. ║ ║
║ "That's... that's... that is just terrible!" he said. ║ that's ║
║ The man walked down the road. ║ the ║
║ Slowly, he ate the pie, savoring each delicious bite. He felt like he was truly happy. ║ he ║
╚═══════════════════════════════════════════════════════════════════════════════════════════════╩═══════════════╝
#PostgreSQL, 245 bytes#
WITH z AS(SELECT DISTINCT*,COUNT(*)OVER(PARTITION BY t,m)c FROM i,regexp_split_to_table(translate(lower(t),'.,"!',''),E'\\s+')m)
SELECT t,CASE WHEN COUNT(*)>1 THEN '' ELSE MAX(m)END
FROM z WHERE(t,c)IN(SELECT t,MAX(c)FROM z GROUP BY t)
GROUP BY t
Output:
╔═══════════════════════════════════════════════════════════════════════════════════════════════╦═══════════════╗
║ t ║ max ║
╠═══════════════════════════════════════════════════════════════════════════════════════════════╬═══════════════╣
║ a a a b b b c ║ ║
║ The old-fashioned man ate an old-fashioned cake. ║ old-fashioned ║
║ IPv6 looks great, much better than IPv4, except for the fact that IPv6 has longer addresses. ║ ipv6 ║
║ This sentence has no most frequent word. ║ ║
║ "That's... that's... that is just terrible!" he said. ║ that's ║
║ The man walked down the road. ║ the ║
║ Slowly, he ate the pie, savoring each delicious bite. He felt like he was truly happy. ║ he ║
╚═══════════════════════════════════════════════════════════════════════════════════════════════╩═══════════════╝
#PostgreSQL, 246 bytes#
WITH z AS(SELECT DISTINCT*,COUNT(*)OVER(PARTITION BY t,m)c FROM i,regexp_split_to_table(translate(lower(t),'.,"''',''),E'\\s+')m)
SELECT t,CASE WHEN COUNT(*)>1 THEN '' ELSE MAX(m)END
FROM z WHERE(t,c)IN(SELECT t,MAX(c)FROM z GROUP BY t)
GROUP BY t
Output:
#PostgreSQL, 246245 bytes#
WITH z AS(SELECT DISTINCT*,COUNT(*)OVER(PARTITION BY t,m)c FROM i,regexp_split_to_table(translate(lower(t),'.,"'''"!',''),E'\\s+')m)
SELECT t,CASE WHEN COUNT(*)>1 THEN '' ELSE MAX(m)END
FROM z WHERE(t,c)IN(SELECT t,MAX(c)FROM z GROUP BY t)
GROUP BY t
Output:SqlFiddleDemo
enter image description here Output:
╔═══════════════════════════════════════════════════════════════════════════════════════════════╦═══════════════╗
║ t ║ max ║
╠═══════════════════════════════════════════════════════════════════════════════════════════════╬═══════════════╣
║ a a a b b b c ║ ║
║ The old-fashioned man ate an old-fashioned cake. ║ old-fashioned ║
║ IPv6 looks great, much better than IPv4, except for the fact that IPv6 has longer addresses. ║ ipv6 ║
║ This sentence has no most frequent word. ║ ║
║ "That's... that's... that is just terrible!" he said. ║ that's ║
║ The man walked down the road. ║ the ║
║ Slowly, he ate the pie, savoring each delicious bite. He felt like he was truly happy. ║ he ║
╚═══════════════════════════════════════════════════════════════════════════════════════════════╩═══════════════╝
#PostgreSQL, 246 bytes#
WITH z AS(SELECT DISTINCT*,COUNT(*)OVER(PARTITION BY t,m)c FROM i,regexp_split_to_table(translate(lower(t),'.,"''',''),E'\\s+')m)
SELECT t,CASE WHEN COUNT(*)>1 THEN '' ELSE MAX(m)END
FROM z WHERE(t,c)IN(SELECT t,MAX(c)FROM z GROUP BY t)
GROUP BY t
Output:
#PostgreSQL, 245 bytes#
WITH z AS(SELECT DISTINCT*,COUNT(*)OVER(PARTITION BY t,m)c FROM i,regexp_split_to_table(translate(lower(t),'.,"!',''),E'\\s+')m)
SELECT t,CASE WHEN COUNT(*)>1 THEN '' ELSE MAX(m)END
FROM z WHERE(t,c)IN(SELECT t,MAX(c)FROM z GROUP BY t)
GROUP BY t
Output:
╔═══════════════════════════════════════════════════════════════════════════════════════════════╦═══════════════╗
║ t ║ max ║
╠═══════════════════════════════════════════════════════════════════════════════════════════════╬═══════════════╣
║ a a a b b b c ║ ║
║ The old-fashioned man ate an old-fashioned cake. ║ old-fashioned ║
║ IPv6 looks great, much better than IPv4, except for the fact that IPv6 has longer addresses. ║ ipv6 ║
║ This sentence has no most frequent word. ║ ║
║ "That's... that's... that is just terrible!" he said. ║ that's ║
║ The man walked down the road. ║ the ║
║ Slowly, he ate the pie, savoring each delicious bite. He felt like he was truly happy. ║ he ║
╚═══════════════════════════════════════════════════════════════════════════════════════════════╩═══════════════╝