query-a57344d91b8de5b313ad4afcd953a364
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?articlename WHERE {
values ?category {wd:Q7780302}.
?link schema:about ?category; schema:isPartOf <https://sk.wikipedia.org/>; schema:name ?title .
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam wikibase:endpoint "sk.wikipedia.org" .
bd:serviceParam mwapi:gcmtitle ?title .
bd:serviceParam mwapi:generator "categorymembers" .
bd:serviceParam mwapi:gcmprop "title" .
bd:serviceParam mwapi:gcmlimit "max" .
# out
?articlename wikibase:apiOutput mwapi:title .
?ns wikibase:apiOutput "@ns" .
filter(?ns="0")
?item wikibase:apiOutputItem mwapi:item .
}
optional {?item rdfs:label ?itemLabel . filter(lang(?itemLabel)="en")}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?articlename"):::projected
v2("?category")
v7("?item"):::projected
v1("?itemLabel"):::projected
v3("?link")
v5("?ns")
v4("?title")
c24(["mwapi:item"]):::iri
c22(["@ns"]):::literal
c17(["title"]):::literal
c8(["bd:serviceParam"]):::iri
c4([https://sk.wikipedia.org/]):::iri
c19(["max"]):::literal
c15(["categorymembers"]):::literal
c12(["sk.wikipedia.org"]):::literal
c21(["mwapi:title"]):::iri
c10(["Generator"]):::literal
bind0[/VALUES ?category/]
bind0-->v2
bind00(["wd:Q7780302"])
bind00 --> bind0
v3 --"schema:about"--> v2
v3 --"schema:isPartOf"--> c4
v3 --"schema:name"--> v4
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
f1[["?ns = '0'"]]
f1 --> v5
c8 --"mwapi:api"--> c10
c8 --"mwapi:endpoint"--> c12
c8 --"mwapi:gcmtitle"--> v4
c8 --"mwapi:generator"--> c15
c8 --"mwapi:gcmprop"--> c17
c8 --"mwapi:gcmlimit"--> c19
v6 --"mwapi:apiOutput"--> c21
v5 --"mwapi:apiOutput"--> c22
v7 --"mwapi:apiOutputItem"--> c24
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v7 -."rdfs:label".-> v1
end