query-38b0035f4dfee83cd001ca438df1b863
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?philo ?philoLabel ?birthLabel ?pbirthLabel ?occLabel ?fìeldLabel ?birthCoord
# will find all entities of a category page that are in BBOX
WHERE
{
SERVICE wikibase:mwapi
{
bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:generator "categorymembers" .
bd:serviceParam mwapi:gcmtitle "Category:Ancient Greek astronomers" .
bd:serviceParam mwapi:gcmlimit "max" .
bd:serviceParam mwapi:gcmnamespace "0" .
?philo wikibase:apiOutputItem mwapi:item .
}
OPTIONAL { ?philo wdt:P569 ?birth.}
OPTIONAL { ?philo wdt:P19 ?pbirth.
OPTIONAL {?pbirth wdt:P625 ?birthCoord .} }
OPTIONAL { ?philo wdt:P106 ?occ. }
OPTIONAL { ?philo wdt:P101 ?field. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]" . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?birth")
v4("?birthCoord"):::projected
v6("?field")
v5("?occ")
v3("?pbirth")
v1("?philo"):::projected
c16(["mwapi:item"]):::iri
c12(["max"]):::literal
c8(["categorymembers"]):::literal
c14(["0"]):::literal
c4(["en.wikipedia.org"]):::literal
c2(["bd:serviceParam"]):::iri
c24(["#91;AUTO_LANGUAGE#93;"]):::literal
c10(["Category:Ancient Greek astronomers"]):::literal
c6(["Generator"]):::literal
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:gcmlimit"--> c12
c2 --"mwapi:gcmnamespace"--> c14
v1 --"mwapi:apiOutputItem"--> c16
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P569".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P19".-> v3
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P625".-> v4
end
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P106".-> v5
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P101".-> v6
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c2 --"mwapi:language"--> c24
end