# Show US presidents and their children who attended the same school
PREFIX dbo:
PREFIX dbr:
PREFIX yago:
SELECT DISTINCT ?president ?child ?school WHERE
{?president a yago:WikicatPresidentsOfTheUnitedStates,
dbo:Person;
dbo:child ?child;
dbo:almaMater|dbp:almaMater|dbo:education|dbp:education ?school.
?child dbo:almaMater|dbp:almaMater|dbo:education|dbp:education ?school.
FILTER (?school != ""@en) }