query-55bb7b51b6531d510c41287945720795

rq turtle/ttl

Query to know who currently owns Pheasant Island (Q373767)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?pays ?paysLabel ?starttime ?endtime
WHERE
{
     wd:Q373767 p:P17 [ps:P17 ?pays;
                   pq:P580 ?starttime;
                   pq:P582 ?endtime;
                  ].
     SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,es". }
FILTER(?starttime < NOW() && ?endtime >= NOW())
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?endtime"):::projected v3("?pays"):::projected v1("?starttime"):::projected a1((" ")) c7(["bd:serviceParam"]):::iri c4(["wd:Q373767"]):::iri c9(["fr,es"]):::literal f0[["?starttime < NOW()?endtime >= NOW()"]] f0 --> v1 f0 --> v2 a1 --"p:statement/P17"--> v3 a1 --"p:qualifier/P580"--> v1 a1 --"p:qualifier/P582"--> v2 c4 --"p:P17"--> a1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end