Sparql 限制属性为rdf:type

Sparql 限制属性为rdf:type,sparql,dbpedia,Sparql,Dbpedia,在这样的查询中,如何避免将?p绑定到rdf:type select ?p ?c where { <http://dbpedia.org/resource/Istance_1> ?p ?c. <http://dbpedia.org/resource/Istance_2> ?p ?c. } 选择?p?c其中{ ?p?c。 ?p?c。 } 在查询中添加一个过滤器: select ?p ?c where { <http://dbpedia.org/reso

在这样的查询中,如何避免将
?p
绑定到
rdf:type

select ?p ?c where {
  <http://dbpedia.org/resource/Istance_1> ?p ?c.
  <http://dbpedia.org/resource/Istance_2> ?p ?c.
} 
选择?p?c其中{
?p?c。
?p?c。
} 

在查询中添加一个
过滤器

select ?p ?c where {
  <http://dbpedia.org/resource/Istance_1>  ?p ?c.
  <http://dbpedia.org/resource/Istance_2>  ?p ?c.
  filter( ?p != rdf:type )
}
如果要复制和粘贴到中,则不需要定义前缀,因为它是,而且,如果要以其他方式调用它,则需要定义前缀

prefix dbpedia: <http://dbpedia.org/resource>
select ?p ?c where {
  dbpedia:Instance_1 ?p ?c .
  dbpedia:Instance_2 ?p ?c .
  filter( ?p != rdf:type )
}