我创建这个查询是为了返回乔治·奥威尔( George )的所有著名著作,但它没有返回结果。
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbp: <http://dbpedia.org/resource/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?title where {
?person foaf:name ?name .
?title dbo:author ?person .
?title dbo:notableWork dbp:George_Orwell .
}我似乎搞不懂为什么没有结果。
我正在http://dbpedia.org/snorql中运行查询
发布于 2017-08-15 16:37:12
你没有关于名著的三部曲,顺序不对吗?
尝试基于此工作查询重写
SELECT *
WHERE {
:George_Orwell dbo:notableWork ?title
}。
title
:Nineteen_Eighty-Four
:Animal_Farm您还可以将:George_Orwell绑定到变量,并询问更多相关信息:
SELECT *
WHERE {
values ?author { :George_Orwell } .
?author rdfs:label ?l .
?title ?p ?author .
?title rdf:type dbo:Book .
filter (lang(?l) = "en")
}并描述事物
describe :Animal_Farmhttps://stackoverflow.com/questions/45697157
复制相似问题