query-6dc5ad87165bdfb3f9c6e10b7f8cd5a5
title:Chairs of the US Federal Reserve and time spent in office SELECT ?item ?itemLabel ?start ?end ?image ?link ?nominatedLabel WHERE { ?item p:P39 ?s.?s ps:P39 wd:Q2666591. ?s pq:P580 ?start. OPTIONAL {?s pq:P582 ?end} OPTIONAL {?item wdt:P18 ?image} OPTIONAL {?item wdt:P1417 ?id} OPTIONAL {?s pq:P4353 ?nominated} BIND(IF(BOUND(?id), URI(CONCAT("https://www.britannica.com/",?id)) , ?item) AS ?link) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". } } ORDER BY ?start
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Chairs of the US Federal Reserve and time spent in office
SELECT ?item ?itemLabel ?start ?end ?image ?link ?nominatedLabel WHERE {
?item p:P39 ?s.?s ps:P39 wd:Q2666591.
?s pq:P580 ?start. OPTIONAL {?s pq:P582 ?end}
OPTIONAL {?item wdt:P18 ?image}
OPTIONAL {?item wdt:P1417 ?id}
OPTIONAL {?s pq:P4353 ?nominated}
BIND(IF(BOUND(?id), URI(CONCAT("https://www.britannica.com/",?id)) , ?item) AS ?link)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
} ORDER BY ?start
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?end"):::projected
v6("?id")
v5("?image"):::projected
v2("?item"):::projected
v8("?link"):::projected
v7("?nominated")
v3("?s")
v1("?start"):::projected
c10(["bd:serviceParam"]):::iri
c3(["wd:Q2666591"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
v2 --"p:P39"--> v3
v3 --"p:statement/P39"--> c3
v3 --"p:qualifier/P580"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P582".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P18".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P1417".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P4353".-> v7
end
bind0[/"if(bound(?id),concat('https://www.britannica.com/',?id),?item)"/]
v6 --o bind0
v2 --o bind0
bind0 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end