Deleting part of a measurement?

I have some data that was erroneously reported from a sensor and then the sensor was corrected. I would like to delete the old data. I can run SELECT mean("value") FROM "kWh" WHERE ("entity_id" = 'solark_total_pv_energy') AND time >= 1642355109364ms and time <= 1642649439793ms GROUP BY time(2m) fill(null) to see the data.

What command can I execute in db v1.8 to delete just these points?

here you go:

since you already know how to identify the wrong data a simple DELETE will do

Thanks, I originally just tried replacing SELECT with DELETE and got errors. What I had to do was remove mean("value") and GROUP BY time(2m) fill(null) from my command and it worked.

DELETE FROM "kWh" WHERE ("entity_id" = 'solark_total_pv_energy') AND time >= 1642355109364ms and time <= 1642649439793ms