SPARQL-获取特定值

SPARQL-获取特定值,sparql,owl,Sparql,Owl,我是SPARQL中的新手,我需要查询一个本体以从中获取一些值: <owl:Class rdf:about="http://purl.obolibrary.org/obo/DOID_1943"> <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">telogen effluvium</rdfs:label> <rdfs:subClassOf rdf:resou

我是SPARQL中的新手,我需要查询一个本体以从中获取一些值:

<owl:Class rdf:about="http://purl.obolibrary.org/obo/DOID_1943">
    <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">telogen effluvium</rdfs:label>
    <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/DOID_987"/>
    <oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DOID:1943</oboInOwl:id>
    <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ICD9CM:704.02</oboInOwl:hasDbXref>
    <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">SNOMEDCT_2010_1_31:201147004</oboInOwl:hasDbXref>
    <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">SNOMEDCT_2010_1_31:39479004</oboInOwl:hasDbXref>
    <oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Telogen effluvium (disorder)</oboInOwl:hasExactSynonym>
    <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">UMLS_CUI:C0263518</oboInOwl:hasDbXref>
    <oboInOwl:hasOBONamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#string">disease_ontology</oboInOwl:hasOBONamespace>
</owl:Class>
我需要选择owl类DOID_1943,并获取标签telogen efluvium以及snomed代码SNOMEDCT_2010_1_31:201147004和SNOMEDCT_2010_1_31:39479004

我正在这样做:

    select distinct ?x ?a 
where {
?x <http://www.geneontology.org/formats/oboInOwl#hasDbXref> ?a 
}
但不起作用,即使我得到了想要的数据,它也与owl类无关。

发现:

select distinct ?x ?label
where {
?x <http://www.geneontology.org/formats/oboInOwl#hasDbXref> "SNOMEDCT_2010_1_31:33176006" . ?x  <http://www.w3.org/2000/01/rdf-schema#label> ?label
}