query-4e789e85260e0898948b4d5e080d5c0d
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?article_name where
{
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "en.wikipedia.org"; # wikipedia 1
wikibase:api "Generator";
mwapi:generator "categorymembers";
mwapi:gcmtitle "Category:Humanitarian aid" ; # category
mwapi:gcmprop "title";
mwapi:gcmlimit "max".
?article_name wikibase:apiOutput mwapi:title.
?item wikibase:apiOutputItem mwapi:item.
?ns wikibase:apiOutput "@ns".
}
filter(BOUND(?item))
filter(?ns="0")
filter not exists { ?article schema:about ?item ;
schema:isPartOf <https://de.wikipedia.org/> ; # wikipedia 2
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?article")
v5("?article_name"):::projected
v3("?item"):::projected
v1("?itemLabel"):::projected
v4("?ns")
c3([https://de.wikipedia.org/]):::iri
c22(["mwapi:item"]):::iri
c23(["@ns"]):::literal
c16(["title"]):::literal
c8(["en.wikipedia.org"]):::literal
c6(["bd:serviceParam"]):::iri
c14(["Category:Humanitarian aid"]):::literal
c18(["max"]):::literal
c12(["categorymembers"]):::literal
c26(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c20(["mwapi:title"]):::iri
c10(["Generator"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"schema:about"--> e0v2
e0v1 --"schema:isPartOf"--> e0c3
e0v1("?article"):::projected
e0v2("?item"):::projected
e0c3([https://de.wikipedia.org/]):::iri
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
f0 --> c2
f0 --> c3
v2 --"schema:about"--> v3
v2 --"schema:isPartOf"--> c3
f1[["?ns = '0'"]]
f1 --> v4
f2[["bound(?item)"]]
f2 --> v3
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c6 --"mwapi:endpoint"--> c8
c6 --"mwapi:api"--> c10
c6 --"mwapi:generator"--> c12
c6 --"mwapi:gcmtitle"--> c14
c6 --"mwapi:gcmprop"--> c16
c6 --"mwapi:gcmlimit"--> c18
v5 --"mwapi:apiOutput"--> c20
v3 --"mwapi:apiOutputItem"--> c22
v4 --"mwapi:apiOutput"--> c23
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c6 --"mwapi:language"--> c26
end