query-faae355acd9e6ef0a7e4b195b9d4905b
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?layer ?editor ?editorLabel ?employer ?employerLabel ?coord ?image WHERE {
# Fetch data
?WikiJournal wdt:P123 wd:Q28953974. # journals in WJ user group
?WikiJournal wdt:P5769|wdt:P98 ?editor. # journal's current editor(s) & EiC(s)
OPTIONAL { ?editor wdt:P18 ?image }
FILTER(NOT EXISTS { ?editor pq:P582 ?x. })
?editor wdt:P108 ?employer. # editor's current employer(s)
FILTER(NOT EXISTS { ?employer pq:P582 ?x. })
OPTIONAL {?employer wdt:P625 ?coord. } # employer's geolocation(s)
# Fetch lables
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?WikiJournal rdfs:label ?layer.}
}
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?WikiJournal")
v6("?coord"):::projected
v3("?editor"):::projected
v1("?employer"):::projected
v5("?image"):::projected
v7("?layer"):::projected
v2("?x")
c3(["wd:Q28953974"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"pq:P582"--> e0v2
e0v1("?employer"):::projected
e0v2("?x"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"pq:P582"--> v2
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"pq:P582"--> e1v2
e1v1("?editor"):::projected
e1v2("?x"):::projected
end
f1--EXISTS--> f1e1
f1 --> v3
f1 --> c1
f1 --> v2
v3 --"pq:P582"--> v2
v4 --"wdt:P123"--> c3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P98"--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P5769"--> v3
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P18".-> v5
end
v3 --"wdt:P108"--> v1
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
v4 --"rdfs:label"--> v7
end