Прямо сейчас тег 'sql', так что это стандартный SQL-2003:
WITH tbl (Fruit, Attribute)
AS
(
SELECT Fruit, Attribute
FROM (
VALUES ('Apple', 'A'),
('Apple', 'B'),
('Banana', 'A'),
('Banana', 'B'),
('Orange', 'A')
) AS tbl (Fruit, Attribute)
)
SELECT T1.Fruit, T1.Attribute
FROM tbl AS T1
WHERE T1.Attribute = 'A'
AND 1 = (
SELECT COUNT(*)
FROM tbl AS T2
WHERE T2.Fruit = T1.Fruit
);