query-67a83efe33dca160922630e6c29d3e36

rq turtle/ttl

Meest gemiddelde zomergast

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 ?guest ?guestLabel where {
  ?item wdt:P179 wd:Q2330424;
        wdt:P5030 ?guest;
        wdt:P577 ?pubDate. 
  ?guest wdt:P569 ?dob;
         wdt:P106 wd:Q36180;
         wdt:P21 wd:Q6581097.
  bind (year(?dob) as ?dobyear). 
  bind (year(?pubDate) as ?pubyear).
  bind (?pubyear - ?dobyear as ?age).
  filter (?age = 51)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "nl". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?age") v5("?dob") v6("?dobyear") v3("?guest"):::projected v2("?item") v4("?pubDate") v7("?pubyear") c10(["wd:Q6581097"]):::iri c8(["wd:Q36180"]):::iri c12(["bd:serviceParam"]):::iri c3(["wd:Q2330424"]):::iri c14(["nl"]):::literal f0[["?age = '51^^xsd:integer'"]] f0 --> v8 v2 --"wdt:P179"--> c3 v2 --"wdt:P5030"--> v3 v2 --"wdt:P577"--> v4 v3 --"wdt:P569"--> v5 v3 --"wdt:P106"--> c8 v3 --"wdt:P21"--> c10 bind1[/"year-from-dateTime(?dob)"/] v5 --o bind1 bind1 --as--o v6 bind2[/"year-from-dateTime(?pubDate)"/] v4 --o bind2 bind2 --as--o v7 bind3[/"?pubyear - ?dobyear"/] v7 --o bind3 v6 --o bind3 bind3 --as--o v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end