Select * from turnos Where fecha <= '2025-07-06 4:00:00' and (confirmacionsms='enviado' or confirmacionsms='aenviar' or confirmacionsms='entregado' or confirmacionsms='noentregado') and not(paciente like '*****************%') Order By fecha,nropaciente