Deberia ser esta la instruccion cuando le aplicas la condicion where para obtener las reservas vigentes (condicion = 1) : SELECT c.Id_cliente, c.Nombre, COUNT(r.Id_reserva) as total FROM cliente c LEFT JOIN reserva r ON c.Id_cliente = r.Id_cliente GROUP BY c.Id_cliente where r.condicion = 1 union (select c.id_cliente, c.nombre, 0 from cliente as c where c.id_cliente not in (select r.id_cliente from reserva as r where r.condicion = 1) ) El segundo select obtiene los clientes sin las reservas vigentes.