Closed KMax closed 10 years ago
Есть один вариант запроса, но кривой, с дублированием:
PREFIX swrc:<http://swrc.ontoware.org/ontology#>
PREFIX foaf:<http://xmlns.com/foaf/0.1/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms:<http://purl.org/dc/terms/>
PREFIX bibo:<http://purl.org/ontology/bibo/>
PREFIX timeline:<http://purl.org/NET/c4dm/timeline.owl#>
SELECT ?search ?editor WHERE {
{
SELECT ?search ?workshop ?editor WHERE {
VALUES ?search {"Linked Data on the Web" "Semantic Publishing"} .
?workshop a bibo:Workshop;
rdfs:label ?label .
FILTER(strStarts(?label, ?search)) .
[] a swrc:Proceedings;
bibo:presentedAt ?workshop;
swrc:editor ?editor .
}
}
{
SELECT ?search (COUNT(?workshop) AS ?count) WHERE {
VALUES ?search {"Linked Data on the Web" "Semantic Publishing"} .
?workshop a bibo:Workshop;
rdfs:label ?label .
FILTER(strStarts(?label, ?search)) .
}
GROUP BY ?search
}
}
GROUP BY ?search ?editor
HAVING (COUNT(?search) = MAX(?count))
http://challenges.2014.eswc-conferences.org/index.php/SemPub/QueriesTask1#Query_Q1.7:_Chairs_over_the_History_of_a_Workshop