query-ebd8060a1c610003c35acf0e0997e3ab
TODO
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/>
SELECT ?CoC (count(?article) as ?hi_count) (count(?article2) as ?en_count) WHERE {
?item wdt:P106 wd:Q82955.
?item wdt:P27 ?CoC .
VALUES ?CoC {wd:Q30} # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
OPTIONAL { ?article schema:about ?item ;
schema:isPartOf <https://hi.wikipedia.org/> . }
OPTIONAL { ?article2 schema:about ?item ;
schema:isPartOf <https://en.wikipedia.org/> . }
} group by ?CoC
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?CoC"):::projected
v3("?article"):::projected
v4("?article2"):::projected
v6("?en_count")
v5("?hi_count")
v1("?item")
c7([https://en.wikipedia.org/]):::iri
c2(["wd:Q82955"]):::iri
c6([https://hi.wikipedia.org/]):::iri
v1 --"wdt:P106"--> c2
v1 --"wdt:P27"--> v3
bind0[/VALUES ?CoC/]
bind0-->v3
bind00(["wd:Q30"])
bind00 --> bind0
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."schema:about".-> v1
v3 --"schema:isPartOf"--> c6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v1
v4 --"schema:isPartOf"--> c7
end
bind3[/"count(?article)"/]
v3 --o bind3
bind3 --as--o v5
bind4[/"count(?article2)"/]
v4 --o bind4
bind4 --as--o v6