prefix xsd: PREFIX owl: PREFIX rdf: PREFIX rdfs: PREFIX replaced_by: PREFIX consider: SELECT ?cls ?replCls ?consCls WHERE { ?cls a owl:Class ; owl:deprecated "true"^^xsd:boolean . OPTIONAL {?cls replaced_by: ?replCls} OPTIONAL {?cls consider: ?consCls} } ORDER BY ?cls