try something like....
select C.Name, C.Title, C.Company from Contact C
where (select count(*) from Contact D where c.SOMEID=d.SOMEID and title like "%pres%" or
title like "%CIO%" or
title like "%CEO" or
title like "%CHAIR%") <=3
if u need to group by...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.