query-308dbae988a097b1c97d8deffd79a5d5

rq turtle/ttl

Si es vol mostrar el label (o altra informaciĆ³) cal descriure'ls com OPTIONAL

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel ?itemDescription WHERE {
  ?item wdt:P31 wd:Q486972, ?value.
  OPTIONAL {
    ?item rdfs:label ?itemLabel.
    FILTER((LANG(?itemLabel)) = "ca")
  }
  OPTIONAL {
    ?item schema:description ?itemDescription.
    FILTER((LANG(?itemDescription)) = "ca")
  }
}
GROUP BY ?item ?itemLabel ?itemDescription
HAVING ((COUNT(DISTINCT ?value)) = 1 )
LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?_anon_d00291b7e9a143df8ec0be8c8ebd714c61211") v3("?item"):::projected v1("?itemDescription"):::projected v2("?itemLabel"):::projected v4("?value") a1((" ")) c4(["wd:Q486972"]):::iri f0[[" = '1^^xsd:integer'"]] f0 --> a1 v3 --"wdt:P31"--> c4 v3 --"wdt:P31"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:description".-> v1 end bind2[/"count(?value)"/] v4 --o bind2 bind2 --as--o v5