I have a query like this:
select c.title, count(b.role) as directors_num from cast_info a inner join role_type b on a.role_id = b.id