All pastes #70542 Raw Edit

Someone

public text v1 · immutable
#70542 ·published 2006-06-24 12:04 UTC
rendered paste body
select distinct P.name, COUNT(R.role) as num 
from people P, role R 
where P.person_id = R.person_id 
and R.role = 'actor' 
and num > 2 
group by R.person_id;