query-49c51e44f111d146c73d74dde018edb8
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX schema: <http://schema.org/>
SELECT (COUNT(DISTINCT ?wikidataItem) AS ?totalArticlesWithEnglishPlusOneOtherLanguage) WHERE {
# Find articles linked to the Wikidata item in English Wikinews
?enArticle schema:about ?wikidataItem;
schema:isPartOf <https://en.wikinews.org/>.
# Find articles linked to the same Wikidata item in any other language
?otherArticle schema:about ?wikidataItem;
schema:isPartOf ?otherWikinewsSite.
FILTER (?otherWikinewsSite != <https://en.wikinews.org/>)
FILTER NOT EXISTS {
?enArticle schema:name ?enName.
FILTER(CONTAINS(?enName, "Template:")|| CONTAINS(?enName, "Category:") || CONTAINS(?enName, "Portal:") || CONTAINS(?enName, "Page:"))
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?enArticle")
v1("?enName")
v5("?otherArticle")
v3("?otherWikinewsSite")
v6("?totalArticlesWithEnglishPlusOneOtherLanguage")
v4("?wikidataItem"):::projected
c6([https://en.wikinews.org/]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["(contains(?enName,'Template:') || (contains(?enName,'Category:') || (contains(?enName,'Portal:') || contains(?enName,'Page:'))))"]]
e0f0 --> e0v1
e0v2 --"schema:name"--> e0v1
e0v2("?enArticle"):::projected
e0v1("?enName"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v2
f0 --> c5
f1[["(contains(?enName,'Template:') || (contains(?enName,'Category:') || (contains(?enName,'Portal:') || contains(?enName,'Page:'))))"]]
f1 --> v1
v2 --"schema:name"--> v1
f2[["?otherWikinewsSite != https://en.wikinews.org/"]]
f2 --> v3
v2 --"schema:about"--> v4
v2 --"schema:isPartOf"--> c6
v5 --"schema:about"--> v4
v5 --"schema:isPartOf"--> v3
bind4[/"count(?wikidataItem)"/]
v4 --o bind4
bind4 --as--o v6