Grazie funziona! C'era solo un piccolo errore nella tua query, terz'ultima riga è: schedule.guest = teamG.tid
Per il count ho fatto così:
select count(*) as Derby, Host, Guest
from (select match.host as HostCode, teamH.name as Host, teamH.city, match.Guest as GuestCode, teamG.name as Guest, teamG.City
from match
left join team as teamH
on match.host = teamH.tid
left join team as teamG
on match.guest = teamG.tid
where teamH.city = teamG.city
order by match.host, match.guest);
Vabbè poi la tabella si chiama match e non schedule, cmq uguale
