query-a26dda73242eeac39b58382101d781fe

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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#>
SELECT ?item ?itemLabel ?ordinal ?birthyear ?deadyear ?startyear ?endyear ?trec
WHERE 
{
  ?item wdt:P39 wd:Q41210386.
  ?item p:P39 ?position .
  ?position ps:P39 wd:Q41210386 .
  ?position pq:P1545 ?ordinal .  
  OPTIONAL { ?item wdt:P569 ?db. }
  OPTIONAL { ?item wdt:P570 ?dd. }
  OPTIONAL { ?position pq:P580 ?st. }
  OPTIONAL { ?position pq:P582 ?en. }
  OPTIONAL { ?item wdt:P3365 ?trec. }
  BIND(str(YEAR(?db)) AS ?birthyear)
  BIND(str(YEAR(?dd)) AS ?deadyear)
  BIND(str(YEAR(?st)) AS ?startyear)
  BIND(str(YEAR(?en)) AS ?endyear)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ASC(xsd:integer(?ordinal))

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?birthyear"):::projected v4("?db") v5("?dd") v10("?deadyear"):::projected v7("?en") v12("?endyear"):::projected v2("?item"):::projected v1("?ordinal"):::projected v3("?position") v6("?st") v11("?startyear"):::projected v8("?trec"):::projected c14(["it"]):::literal c2(["wd:Q41210386"]):::iri c12(["bd:serviceParam"]):::iri v2 --"p:direct/P39"--> c2 v2 --"p:P39"--> v3 v3 --"p:statement/P39"--> c2 v3 --"p:qualifier/P1545"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P569".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P570".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P580".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P582".-> v7 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P3365".-> v8 end bind0[/"str(year-from-dateTime(?db))"/] v4 --o bind0 bind0 --as--o v9 bind1[/"str(year-from-dateTime(?dd))"/] v5 --o bind1 bind1 --as--o v10 bind2[/"str(year-from-dateTime(?st))"/] v6 --o bind2 bind2 --as--o v11 bind3[/"str(year-from-dateTime(?en))"/] v7 --o bind3 bind3 --as--o v12 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end