query-8ed56aeac8fa65f2a91bff26e0e97535
only running against the German Wikipedia it runs in to a timeout. yesterday it succeed for some times with limitations up to 500, but since yesterday afternoon it won't work anymore...
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?cat ?title WHERE {
?Eisenbahn wdt:P31 wd:Q728937.
?Eisenbahn wdt:P17 wd:Q40.
?wikiLink schema:isPartOf <https://de.wikipedia.org/>;
schema:name ?title ;
schema:about ?Eisenbahn.
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Categories" .
bd:serviceParam wikibase:endpoint "de.wikipedia.org" .
bd:serviceParam mwapi:titles ?title .
?cat wikibase:apiOutput mwapi:category .
}
}
LIMIT 30
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?Eisenbahn")
v4("?cat"):::projected
v3("?title"):::projected
v2("?wikiLink")
c6([https://de.wikipedia.org/]):::iri
c12(["Categories"]):::literal
c4(["wd:Q40"]):::iri
c2(["wd:Q728937"]):::iri
c14(["de.wikipedia.org"]):::literal
c10(["bd:serviceParam"]):::iri
c17(["mwapi:category"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P17"--> c4
v2 --"schema:isPartOf"--> c6
v2 --"schema:name"--> v3
v2 --"schema:about"--> v1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c10 --"mwapi:api"--> c12
c10 --"mwapi:endpoint"--> c14
c10 --"mwapi:titles"--> v3
v4 --"mwapi:apiOutput"--> c17
end