I have a table with two columns one the 'clientID' and the second 'usable'. A clientID can appear several times in my table.
If only one occurrence of this clientID exists with a 'NO' it means that in my final table it will have to be tagged 'NO'.
If it has only occurrences with 'YES' it means that it will be tagged in my final table with 'YES'.
how i can make this final table ?
CREATE TABLE InitialValues (
idClient varchar(5),
usable varchar(3),
);
insert into InitialValues(idClient,usable) values
('c1234','yes'),
('c1334','yes'),
('c1334','no'),
('c1434','yes');
select * from InitialValues
CREATE TABLE FinalValues (
idClient varchar(5),
usable varchar(3),
);
insert into FinalValues(idClient,usable) values
('c1234','yes'),
('c1334','no'),
('c1434','yes');
select * from finalValues