query-10df4d859775c26d9a6d6f7d689a56c5
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 ?sitelink_en ?article_en ?sitelink_he ?article_he where
{
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "en.wikipedia.org";
wikibase:api "Generator";
mwapi:generator "categorymembers";
mwapi:gcmtitle "Category:International observances" ; # specifically here
mwapi:gcmprop "ids|title|type";
mwapi:gcmlimit "max".
# out
?name wikibase:apiOutput mwapi:title. # en-wikipedia article / category name
?item wikibase:apiOutputItem mwapi:item. # wikidata QId for the person's item
}
FILTER(BOUND(?item))
?article_en schema:about ?item ;
schema:isPartOf <https://en.wikipedia.org/> ;
schema:name ?sitelink_en .
optional {?article_he schema:about ?item ;
schema:isPartOf <https://he.wikipedia.org/> ;
schema:name ?sitelink_he .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?article_en"):::projected
v5("?article_he"):::projected
v1("?item"):::projected
v2("?name")
v4("?sitelink_en"):::projected
v6("?sitelink_he"):::projected
c18(["mwapi:item"]):::iri
c4(["en.wikipedia.org"]):::literal
c21([https://en.wikipedia.org/]):::iri
c2(["bd:serviceParam"]):::iri
c23([https://he.wikipedia.org/]):::iri
c14(["max"]):::literal
c10(["Category:International observances"]):::literal
c8(["categorymembers"]):::literal
c26(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c16(["mwapi:title"]):::iri
c12(["ids|title|type"]):::literal
c6(["Generator"]):::literal
f0[["bound(?item)"]]
f0 --> v1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:endpoint"--> c4
c2 --"mwapi:api"--> c6
c2 --"mwapi:generator"--> c8
c2 --"mwapi:gcmtitle"--> c10
c2 --"mwapi:gcmprop"--> c12
c2 --"mwapi:gcmlimit"--> c14
v2 --"mwapi:apiOutput"--> c16
v1 --"mwapi:apiOutputItem"--> c18
end
v3 --"schema:about"--> v1
v3 --"schema:isPartOf"--> c21
v3 --"schema:name"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v1
v5 --"schema:isPartOf"--> c23
v5 --"schema:name"--> v6
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c2 --"mwapi:language"--> c26
end