query-9dfbe2b00a8a7a59b88a9ec9401ddf8c

rq turtle/ttl

list of Russian Tsars and Emperors SELECT DISTINCT ?human ?humanLabel ?sexLabel ?title ?titleLabel ?father ?fatherLabel ?mother ?motherLabel ?fam ?famLabel ?dob ?pobLabel ?dod ?podLabel ?geni WHERE { VALUES ?title {wd:Q12370489 wd:Q2618625} ?human wdt:P39 ?title . ?human wdt:P31 wd:Q5 . OPTIONAL{?human wdt:P21 ?sex .} OPTIONAL{?human wdt:P22 ?father .} OPTIONAL{?human wdt:P25 ?mother .} OPTIONAL{?human wdt:P53 ?fam .} OPTIONAL{?human wdt:P569 ?dob .} OPTIONAL{?human wdt:P19 ?pob .} OPTIONAL{?human wdt:P570 ?dod .} OPTIONAL{?human wdt:P20 ?pod .} OPTIONAL{?human wdt:P2600 ?geni .} SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# list of Russian Tsars and Emperors
SELECT DISTINCT ?human ?humanLabel ?sexLabel ?title ?titleLabel ?father ?fatherLabel ?mother ?motherLabel ?fam ?famLabel ?dob ?pobLabel ?dod ?podLabel ?geni WHERE
{
  VALUES ?title {wd:Q12370489 wd:Q2618625}
  ?human wdt:P39 ?title .
  ?human wdt:P31 wd:Q5 .
  OPTIONAL{?human wdt:P21 ?sex .}
  OPTIONAL{?human wdt:P22 ?father .}
  OPTIONAL{?human wdt:P25 ?mother .}
  OPTIONAL{?human wdt:P53 ?fam .}
  OPTIONAL{?human wdt:P569 ?dob .}
  OPTIONAL{?human wdt:P19 ?pob .}
  OPTIONAL{?human wdt:P570 ?dod .}
  OPTIONAL{?human wdt:P20 ?pod .}
  OPTIONAL{?human wdt:P2600 ?geni .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?dob"):::projected v9("?dod"):::projected v6("?fam"):::projected v4("?father"):::projected v11("?geni"):::projected v2("?human"):::projected v5("?mother"):::projected v8("?pob") v10("?pod") v3("?sex") v1("?title"):::projected c16(["en"]):::literal c14(["bd:serviceParam"]):::iri c3(["wd:Q5"]):::iri bind0[/VALUES ?title/] bind0-->v1 bind00(["wd:Q12370489"]) bind00 --> bind0 bind01(["wd:Q2618625"]) bind01 --> bind0 v2 --"wdt:P39"--> v1 v2 --"wdt:P31"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P21".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P22".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P25".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P53".-> v6 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P569".-> v7 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P19".-> v8 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P570".-> v9 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P20".-> v10 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P2600".-> v11 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end