query-2baf46c537d30a599d163169ab07a944
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT ?item (COUNT(?wiki) AS ?wikis) ?en ?es ?fr ?pt
WHERE {
VALUES ?item { wd:Q20 wd:Q21 wd:Q22 } # <- Replace with your set of items
OPTIONAL { ?wiki schema:about ?item; schema:isPartOf / wikibase:wikiGroup "wikipedia". }
OPTIONAL { ?en_ schema:about ?item; schema:isPartOf <https://en.wikipedia.org/>; schema:name ?en. }
OPTIONAL { ?es_ schema:about ?item; schema:isPartOf <https://es.wikipedia.org/>; schema:name ?es. }
OPTIONAL { ?fr_ schema:about ?item; schema:isPartOf <https://fr.wikipedia.org/>; schema:name ?fr. }
OPTIONAL { ?pt_ schema:about ?item; schema:isPartOf <https://pt.wikipedia.org/>; schema:name ?pt. }
}
GROUP BY ?item ?en ?es ?fr ?pt
ORDER BY DESC(?wikis)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?en"):::projected
v4("?en_")
v7("?es"):::projected
v6("?es_")
v9("?fr"):::projected
v8("?fr_")
v2("?item"):::projected
v11("?pt"):::projected
v10("?pt_")
v3("?wiki"):::projected
v12("?wikis")
a1((" "))
c5([https://en.wikipedia.org/]):::iri
c7([https://es.wikipedia.org/]):::iri
c8([https://fr.wikipedia.org/]):::iri
c4(["wikipedia"]):::literal
c9([https://pt.wikipedia.org/]):::iri
bind0[/VALUES ?item/]
bind0-->v2
bind00(["wd:Q20"])
bind00 --> bind0
bind01(["wd:Q21"])
bind01 --> bind0
bind02(["wd:Q22"])
bind02 --> bind0
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."schema:about".-> v2
v3 --"schema:isPartOf"--> a1
a1 --"wikibase:wikiGroup"--> c4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v2
v4 --"schema:isPartOf"--> c5
v4 --"schema:name"--> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v6 -."schema:about".-> v2
v6 --"schema:isPartOf"--> c7
v6 --"schema:name"--> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v8 -."schema:about".-> v2
v8 --"schema:isPartOf"--> c8
v8 --"schema:name"--> v9
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v10 -."schema:about".-> v2
v10 --"schema:isPartOf"--> c9
v10 --"schema:name"--> v11
end
bind2[/"count(?wiki)"/]
v3 --o bind2
bind2 --as--o v12