SPARQL:如何仅返回值而不是值+ URI?

时间:2019-04-22 12:42:51

标签: sparql

我试图仅检索数据属性的值,但是计数 还返回URI。

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX onto: <http://www.semanticweb.org/fhkb.owl#>

SELECT ?Mother (COUNT(?Mother) AS ?No_Children_Mother) ?Father  (COUNT(? 
 Mother) AS ?No_Children_Father)
    WHERE { ?subject onto:hasMother ?Mother .
            ?subject onto:hasFather ?Father .}
GROUP BY ?Mother ?Father

预期:1

实际:"1"<http://www.w3.org/2001/XMLSchema#integer>

0 个答案:

没有答案