query-393a4faef3a102b4895f17cdb5d596da

rq turtle/ttl

NARA P1225 SELECT ?item ?itemLabel (GROUP_CONCAT(DISTINCT(?natureLabel); separator=", ") AS ?natures) ?ID WHERE { ?item wdt:P1225 ?ID; wdt:P31 ?nature. OPTIONAL {?nature rdfs:label ?natureLabel. filter(lang(?natureLabel)="fr") }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?item ?itemLabel ?natures ?ID LIMIT 5

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#NARA P1225
SELECT ?item ?itemLabel (GROUP_CONCAT(DISTINCT(?natureLabel); separator=", ") AS ?natures) ?ID
WHERE 
{
  ?item wdt:P1225 ?ID;
        wdt:P31 ?nature.
        OPTIONAL {?nature rdfs:label ?natureLabel. filter(lang(?natureLabel)="fr") }       
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?natures ?ID
LIMIT 5

Query found at