解析语句的时候少 ' 符号我怎么做解析的时候才能把 ' 保留
select y,m,d,h, sid,channel,cointype,sum(spend) as num,count(distinct source) as cnt from(select sid,channel,year(ts)as y,month(ts)as m,day(ts)as d ,hour(ts)as h,cast(regexp_extract(param, ‘’{"sid":(.*?),"num":(.*?),("source":(.*?),)?("reason":(.*?),)?"cointype":(.*?),("status":(.*?),)?("petid":(.*?),)?"action":(.*?),("itemid":(.*?),)?("type":(.*?),)?"bid":(.*?)(,"spend":(.*?))?}'', 4) as bigint) as source,cast(regexp_extract(param, ''{"sid":(.*?),"num":(.*?),("source":(.*?),)?("reason":(.*?),)?"cointype":(.*?),("status":(.*?),)?("petid":(.*?),)?"action":(.*?),("itemid":(.*?),)?("type":(.*?),)?"bid":(.*?)(,"spend":(.*?))?}'', 2) as int) as num, cast(regexp_extract(param, ''{"sid":(.*?),"num":(.*?),("source":(.*?),)?("reason":(.*?),)?"cointype":(.*?),("status":(.*?),)?("petid":(.*?),)?"action":(.*?),("itemid":(.*?),)?("type":(.*?),)?"bid":(.*?)(,"spend":(.*?))?}'', 19) as int) as spend,cast(regexp_extract(param, ''{"sid":(.*?),"num":(.*?),("source":(.*?),)?("reason":(.*?),)?"cointype":(.*?),("status":(.*?),)?("petid":(.*?),)?"action":(.*?),("itemid":(.*?),)?("type":(.*?),)?"bid":(.*?)(,"spend":(.*?))?}'', 7) as int) as cointype from analytics where to_date(ts)="{0}" and action=1053 and param like '%"action":1%' and param like '%"cointype":1%') t group by y,m,d, sid,channel,h,cointype order by y,m,d, sid,channel,h,cointype
现在我在加上一个 ' 他就解析不了了,我不加吧是能解析出来关键是少了个 ' 去查数据的时候报错我该加什么才能保留这个 '