I'm using pi sql commander but I'm not sure if this is the best solution.
But I'm having timeout issues because of the large amount of records
Here is an sample query I'm using in Pi SQL Commander. It is an insert with select.
insert into picomp2 (tag, time, value, status, questionable, annotations)
select 'NEW_TAG_BKP', time, value, status, questionable, annotations from picomp2 where tag = 'OLD_TAG' and time >= '2019-01-01 00:00:00'