query-a62f00e858b49170c68ea6a6ec148648

rq turtle/ttl

Longest (years) chains of doctoral advisors

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?p1 ?p1Label ?p1birth ?p2 ?p2Label ?p2birth ?diff WHERE {
?p2 wdt:P184/wdt:P184/wdt:P184/wdt:P184/wdt:P184/wdt:P184/wdt:P184/wdt:P184/wdt:P184+ ?p1;
    wdt:P569 ?p2birth.
?p1 wdt:P569 ?p1birth.
  BIND(YEAR(?p2birth) - YEAR(?p1birth) AS ?diff)
  FILTER ( ?diff > 700)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY DESC(?diff)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?diff"):::projected v3("?p1"):::projected v5("?p1birth"):::projected v2("?p2"):::projected v4("?p2birth"):::projected a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) a6((" ")) a7((" ")) a8((" ")) c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?diff > '700^^xsd:integer'"]] f0 --> v6 v2 --"wdt:P184"--> a1 a1 --"wdt:P184"--> a2 a2 --"wdt:P184"--> a3 a3 --"wdt:P184"--> a4 a4 --"wdt:P184"--> a5 a5 --"wdt:P184"--> a6 a6 --"wdt:P184"--> a7 a7 --"wdt:P184"--> a8 a8 --"wdt:P184"--> v3 v2 --"wdt:P569"--> v4 v3 --"wdt:P569"--> v5 bind1[/"year-from-dateTime(?p2birth) - year-from-dateTime(?p1birth)"/] v4 --o bind1 v5 --o bind1 bind1 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end