I do have 100k domain names with tags... table has got only two column called domain
and tags
.
Tags开发者_Python百科 are stored with coma after each tags. I want fine how many domains with similar tags say search,google,searchengine,engine,web,reference
with all of them or any of them in it. How do I do it?
Without knowing exactly how you want to implement this, here's some SQL to get you started:
SELECT *
FROM domains
WHERE
tag LIKE '*search*' OR
tag LIKE '*google*' OR
tag LIKE '*searchengine*' OR
tag LIKE '*engine*' OR
tag LIKE '*web*' OR
tag LIKE '*reference*'
精彩评论