query-dd65fa6bf4756f382ab032de1fbe0cbb
Timeline US news
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#>
#defaultView:Timeline
SELECT ?candidate ?candidateLabel ?candidateDescription ?start (COALESCE(?end, NOW()) as ?to) ?img
{
BIND( wd:Q22923830 as ?el )
?el p:P726 ?st .
?st ps:P726 ?candidate .
OPTIONAL { ?st pq:P582 ?end }
?el wdt:P155 / wdt:P585 ?start .
OPTIONAL { ?candidate wdt:P18 ?img }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY BOUND(?end) DESC(?to)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?candidate"):::projected
v3("?el")
v1("?end"):::projected
v7("?img"):::projected
v4("?st")
v6("?start"):::projected
v8("?to")
a1((" "))
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/"'wd:Q22923830'"/]
bind0 --as--o v3
v3 --"p:P726"--> v4
v4 --"p:statement/P726"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P582".-> v1
end
v3 --"p:direct/P155"--> a1
a1 --"p:direct/P585"--> v6
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P18".-> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind1[/"?endNOW()"/]
v1 --o bind1
bind1 --as--o v8