这种情况应该怎么查?求大佬们给一条sql语句。

假设有一张表,结构如下

图片说明

要求查询出如下结果

图片说明

这个叫 walk the string,需要一个辅助的序号列。
假设你还有一个序号表 Series,里面有一列(id)从 1 开始,逐个加 1,你的原表叫 csdn,用 full join 配合 substr 就行:

select t1.id, case when t2.id = 3 
                                        then t1.title
                                        else '' end title, 
            substring(memo, t2.id - 2, 3) memo
from csdn t1, series t2
where ceiling(len(memo) / 3.) * 3 >= t2.id
and t2.id % 3 = 0

类似这个
https://blog.csdn.net/asktommorow/article/details/52442093

SUBSTRING_INDEX(note, ',', seq)
直接换成3的倍数

没明白你的需求是什么
请阐述清楚你的需求,和使用的数据库类型