query-253210443ea1ffd3c597b105989e3e74

rq turtle/ttl

TODO

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#>
SELECT ?d ?cast ?castLabel ?dob ?age
{
    BIND( wd:Q212098 as ?film)
    ?film wdt:P577 ?d
    FILTER NOT EXISTS { ?film wdt:P577 ?d1 FILTER( ?d1 < ?d) }
    ?film ( wdt:P161| wdt:P57 )  ?cast . ?cast wikibase:sitelinks ?sitelinks.
    OPTIONAL { ?cast wdt:P569 ?dob }
    BIND( YEAR(?d)-YEAR(?dob) as ?age)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by desc(?sitelinks) LIMIT 5

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?age"):::projected v5("?cast"):::projected v3("?d"):::projected v2("?d1") v6("?dob"):::projected v5("?film") v1("?sitelinks") c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?d1 < ?d"]] e0f0 --> e0v1 e0f0 --> e0v2 e0v3 --"wdt:P577"--> e0v1 e0v2("?d"):::projected e0v1("?d1"):::projected e0v3("?film"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> v3 f0 --> v5 f0 --> c1 f1[["?d1 < ?d"]] f1 --> v2 f1 --> v3 v5 --"wdt:P577"--> v2 bind2[/"'wd:Q212098'"/] bind2 --as--o v5 v5 --"wdt:P577"--> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v5 --"wdt:P57"--> v5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v5 --"wdt:P161"--> v5 end union0r <== or ==> union0l end v5 --"wikibase:sitelinks"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P569".-> v6 end bind3[/"year-from-dateTime(?d) - year-from-dateTime(?dob)"/] v3 --o bind3 v6 --o bind3 bind3 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end