fix influxdb query escapes, record deletion