SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)
Find the name of the person who has friends with age above 40 but not under age 30?
SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN ( SELECT name FROM Person WHERE age > 40 ) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN ( SELECT name FROM Person WHERE age < 30 )
select t1 . name from person as t1 join personfriend as t2 on t1 . name = t2 . name where t2 . friend in ( select name from person where age > value ) except select t1 . name from person as t1 join personfriend as t2 on t1 . name = t2 . name where t2 . friend in ( select name from person where age < value )
Find the name of the person who has friends with age above 40 but not under age 30 ?