insert into cajas
SELECT 
    ROW_NUMBER() OVER (ORDER BY fecha) AS recno,
    1,
    fecha
FROM (
    SELECT DISTINCT fecha 
    FROM cobros
) t;
-----
update parametros set nro_caja = (SELECT max(nro_caja) from cajas) + 1;
-----
update cobros set nro_caja = (select nro_caja from cajas where cajas.FECHA_HORA = cobros.fecha);