query-4965aab4e2b1ae4a438f698f9a380b6c
Copyright term(s) of a country SELECT DISTINCT ?item ?itemLabel ( GROUP_CONCAT ( DISTINCT ?partLabel; SEPARATOR=", ") AS ?appliesToParts ) # Concatenate types of works WHERE { {?item wdt:P279 wd:Q108698760 . } # Look for group of countries with post mortem auctoris copyright... UNION # ...or... { ?item wdt:P279 wd:Q108701480 . } # ...group of countries with copyright based on publication date. ?item p:P1001 ?countryStatement . ?countryStatement ps:P1001 wd:Q241 . # Select a specific country. OPTIONAL { ?countryStatement pq:P518 ?part . } # Get the types of works to which the copyright term applies. SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?item rdfs:label ?itemLabel . # Necessary to concatenate types of works. ?part rdfs:label ?partLabel . # Necessary to concatenate types of works. } } GROUP BY ?item ?itemLabel
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Copyright term(s) of a country
SELECT DISTINCT ?item ?itemLabel ( GROUP_CONCAT ( DISTINCT ?partLabel; SEPARATOR=", ") AS ?appliesToParts ) # Concatenate types of works
WHERE {
{?item wdt:P279 wd:Q108698760 . } # Look for group of countries with post mortem auctoris copyright...
UNION # ...or...
{ ?item wdt:P279 wd:Q108701480 . } # ...group of countries with copyright based on publication date.
?item p:P1001 ?countryStatement .
?countryStatement ps:P1001 wd:Q241 . # Select a specific country.
OPTIONAL { ?countryStatement pq:P518 ?part . } # Get the types of works to which the copyright term applies.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .
?item rdfs:label ?itemLabel . # Necessary to concatenate types of works.
?part rdfs:label ?partLabel . # Necessary to concatenate types of works.
}
}
GROUP BY ?item ?itemLabel