是否可以查询count post包含hashtag(#),其中相同的#标签(#)在列中超过1。
示例:
tb_post
post_id | post
1 | #enjoy #go_green
2 | I like this #enjoy
3 | What about me? #enjoy #enjoy
4 | We have to back to nature #forlive #go_green #go_green
是否可以计算#enjoy应该是4和#go_green 3?
这是我的查询
SELECT SUBSTR( post, LOCATE( '#', post ) ) hashtag
FROM tb_post
WHERE post LIKE '%#enjoy%'
LIMIT 0 , 30
当我执行时,它只显示3.它应该是4。