query-929fb2341e99f64b1e0a18a5dd523ffa
title:Wikipedia articles about specific Memory of the World inscriptions SELECT ?langname (COUNT(?item) AS ?count) WHERE { ?item p:P1435 ?s. ?s ps:P1435 wd:Q473858. # Heritage designation: MotW ?site schema:about ?item ; schema:inLanguage ?langcode. FILTER(CONTAINS(str(?site), ".wikipedia.org/") ) OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langlabel FILTER(lang(?langlabel) = "en") } # Convert short code to full language name BIND(COALESCE(?langlabel, ?langcode) AS ?langname) } GROUP BY ?langname ORDER BY DESC(?count)
Use at
- https://query.wikidata.org/sparql
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#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
#title:Wikipedia articles about specific Memory of the World inscriptions
SELECT ?langname (COUNT(?item) AS ?count) WHERE {
?item p:P1435 ?s. ?s ps:P1435 wd:Q473858. # Heritage designation: MotW
?site schema:about ?item ; schema:inLanguage ?langcode. FILTER(CONTAINS(str(?site), ".wikipedia.org/") )
OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langlabel FILTER(lang(?langlabel) = "en") } # Convert short code to full language name
BIND(COALESCE(?langlabel, ?langcode) AS ?langname)
} GROUP BY ?langname
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v9("?count")
v4("?item"):::projected
v6("?langcode")
v3("?langlabel")
v8("?langname"):::projected
v7("?language")
v5("?s")
v2("?site")
c5(["wd:Q473858"]):::iri
f0[["contains(str(?site),'.wikipedia.org/')"]]
f0 --> v2
v4 --"p:P1435"--> v5
v5 --"p:statement/P1435"--> c5
v2 --"schema:about"--> v4
v2 --"schema:inLanguage"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v7 -."p:direct/P218".-> v6
v7 --"rdfs:label"--> v3
end
bind1[/"?langlabel?langcode"/]
v3 --o bind1
v6 --o bind1
bind1 --as--o v8
bind3[/"count(?item)"/]
v4 --o bind3
bind3 --as--o v9