query-e52f0bf18e7ba5b0faa01c35d8b38b87
All events from a special festival
SELECT ?festival ?festivalLabel
(GROUP_CONCAT(DISTINCT ?musicianLabel; separator=", ") AS ?musicians)
?nummer ?start ?end
WHERE {
VALUES ?f { wd:Q3070337 } # Gnaoua World Music Festival (changy to whatever country you want)
VALUES ?b { wdt:P740 wdt:P495 wdt:P27 }
?festival wdt:P31 ?f.
OPTIONAL { ?festival p:P179 [ pq:P1545 ?nummer ] . }
OPTIONAL { ?festival wdt:P580 ?start . }
OPTIONAL { ?festival wdt:P582 ?end . }
OPTIONAL { ?festival wdt:P710 ?musician . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr".
?festival rdfs:label ?festivalLabel .
?musician rdfs:label ?musicianLabel .
}
}
GROUP BY ?festival ?festivalLabel ?nummer ?start ?end
ORDER BY ASC (?festivalLabel)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# All events from a special festival
SELECT ?festival ?festivalLabel
(GROUP_CONCAT(DISTINCT ?musicianLabel; separator=", ") AS ?musicians)
?nummer ?start ?end
WHERE {
VALUES ?f { wd:Q3070337 } # Gnaoua World Music Festival (changy to whatever country you want)
VALUES ?b { wdt:P740 wdt:P495 wdt:P27 }
?festival wdt:P31 ?f.
OPTIONAL { ?festival p:P179 [ pq:P1545 ?nummer ] . }
OPTIONAL { ?festival wdt:P580 ?start . }
OPTIONAL { ?festival wdt:P582 ?end . }
OPTIONAL { ?festival wdt:P710 ?musician . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr".
?festival rdfs:label ?festivalLabel .
?musician rdfs:label ?musicianLabel .
}
}
GROUP BY ?festival ?festivalLabel ?nummer ?start ?end
ORDER BY ASC (?festivalLabel)