query-00c50cea76f94b3d7b1f4c4f9090d800
Timeline of Fatamid, Umayyad and Abbasid Caliphs
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 schema: <http://schema.org/>
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#>
SELECT ?item ?itemLabel ?caliphLabel ?image ?start ?end ?wp WHERE {
VALUES ?caliph {wd:Q14979753 wd:Q28541943 wd:Q67497236}
?item p:P39 ?s.?s ps:P39 ?caliph
# OPTIONAL {?item wdt:P53 ?family}
OPTIONAL {?s pq:P580 ?start}
OPTIONAL {?s pq:P582 ?end}
OPTIONAL {?item wdt:P18 ?img}
OPTIONAL {?item wdt:P158 ?sealimg}
OPTIONAL {?item wdt:P6802 ?relatedimg}
BIND(COALESCE(?img, ?sealimg, ?relatedimg) AS ?image)
OPTIONAL {?wp schema:about ?item; schema:isPartOf <https://en.wikipedia.org/>}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?start
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?caliph")
v5("?end"):::projected
v9("?image"):::projected
v6("?img")
v3("?item"):::projected
v8("?relatedimg")
v4("?s")
v7("?sealimg")
v1("?start"):::projected
v10("?wp"):::projected
c10([https://en.wikipedia.org/]):::iri
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?caliph/]
bind0-->v2
bind00(["wd:Q14979753"])
bind00 --> bind0
bind01(["wd:Q28541943"])
bind01 --> bind0
bind02(["wd:Q67497236"])
bind02 --> bind0
v3 --"p:P39"--> v4
v4 --"p:statement/P39"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P580".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P582".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P18".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P158".-> v7
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P6802".-> v8
end
bind1[/"?img?sealimg?relatedimg"/]
v6 --o bind1
v7 --o bind1
v8 --o bind1
bind1 --as--o v9
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v10 -."schema:about".-> v3
v10 --"schema:isPartOf"--> c10
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end