adds statistics insert query