Yepoleb: I can't say if this will work correctly, too much implicit conversion going on here. serialized_record contains additional details that I don't need to select for, but I do show, like the old and new value. I can't tell you if it's necessary to load it.
Serialized_record seems to contain id,name,size,count of the affected bonus content, though.
They don't have their own columns.
EDIT: ok, it seems I can use substr() and instr() to retrieve them.
Not ideal, but better than nothing.
--
Ok, for now this seems to be working (despite Gog messing up the view):
SELECT product_id, product_title,
substr(serialized_record, instr(serialized_record,'"id": "')+7, instr( substr(serialized_record,instr(serialized_record,'"id": "')+7,length(serialized_record)) ,'"')-1) "Bonus_id",
strftime('%Y-%m-%d %H:%M:%S',timestamp,'unixepoch') "Date", action,
substr(serialized_record, instr(serialized_record,'"name": "')+9, instr( substr(serialized_record,instr(serialized_record,'"name": "')+9,length(serialized_record)) ,'"')-1) "Bonus_name",
bonus_type,
substr(serialized_record, instr(serialized_record,'"count": ')+9, instr( substr(serialized_record,instr(serialized_record,'"count": ')+9,length(serialized_record)) ,',')-1) "Bonus_count",
substr(serialized_record, instr(serialized_record,'"total_size": ')+14, instr( substr(serialized_record,instr(serialized_record,'"total_size": ')+14,length(serialized_record)) ,'},')-1) "Bonus_size"
FROM changelog
WHERE "dl_type" = 'bonus' AND timestamp >= strftime('%s','2021-01-12')
ORDER BY product_title asc, Bonus_id asc, Date asc;