query-9ad07bdad2506dbe213b3c04c85a1400
TODO
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?title ?article ?item ?location ?geolex WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
bd:serviceParam mwapi:gcmtitle "Category:United States geologic formation stubs" .
bd:serviceParam mwapi:generator "categorymembers" .
bd:serviceParam mwapi:gcmprop "title" .
bd:serviceParam mwapi:gcmtype "page" .
bd:serviceParam mwapi:gcmlimit "max" .
?title wikibase:apiOutput mwapi:title .
?item wikibase:apiOutputItem mwapi:item .
} .
?article schema:about ?item; schema:isPartOf <https://en.wikipedia.org/> .
OPTIONAL { ?item wdt:P131 ?location } .
OPTIONAL { ?item wdt:P6202 ?geolex } .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?article"):::projected
v5("?geolex"):::projected
v2("?item"):::projected
v4("?location"):::projected
v1("?title"):::projected
c8(["Category:United States geologic formation stubs"]):::literal
c20(["mwapi:item"]):::iri
c12(["title"]):::literal
c6(["en.wikipedia.org"]):::literal
c23([https://en.wikipedia.org/]):::iri
c2(["bd:serviceParam"]):::iri
c16(["max"]):::literal
c10(["categorymembers"]):::literal
c14(["page"]):::literal
c18(["mwapi:title"]):::iri
c4(["Generator"]):::literal
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:api"--> c4
c2 --"mwapi:endpoint"--> c6
c2 --"mwapi:gcmtitle"--> c8
c2 --"mwapi:generator"--> c10
c2 --"mwapi:gcmprop"--> c12
c2 --"mwapi:gcmtype"--> c14
c2 --"mwapi:gcmlimit"--> c16
v1 --"mwapi:apiOutput"--> c18
v2 --"mwapi:apiOutputItem"--> c20
end
v3 --"schema:about"--> v2
v3 --"schema:isPartOf"--> c23
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P131".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P6202".-> v5
end