PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
SELECT ?X ?Y
WHERE {
 ?Y rdf:type ub:University .
 ?Z ub:subOrganizationOf ?Y .
 ?Z rdf:type ub:Department .
 ?X ub:undergraduateDegreeFrom ?Y .
 ?X rdf:type ub:GraduateStudent .
 ?X ub:memberOf ?Z
}