[英]Selecting nested locations in SPARQL
我正在使用以下演示:
SELECT ?performer ?prefLabel ?date ?location WHERE
{
?art rdf:type etree:Concert.
?art rdf:type mo:Performance.
?art mo:performer ?performer.
?art skos:prefLabel ?prefLabel.
?art etree:date ?date.
?art event:place ?location.
}
LIMIT 2
但是,我也希望选择一个命名属性“?place”的值,在“?location”的每个条目中都包含一个值,我该如何调整查询来做到这一点?
我不确定我是否正确理解您在这句话中的意思:
命名属性“?place”,在“?location”的每个条目中都包含一个值
我猜你正在寻找的东西像这样 :
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX etree: <http://etree.linkedmusic.org/vocab/>
PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
SELECT ?performer ?prefLabel ?date ?location ?place WHERE
{
?art a etree:Concert, mo:Performance ;
mo:performer ?performer ;
skos:prefLabel ?prefLabel ;
etree:date ?date ;
event:place ?location .
?location etree:location ?place .
} LIMIT 2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.