query-9c1e161f2b6071a1e68ab1d836a2c386

rq turtle/ttl

But this query returns all jobs, not only "United States senator" (wd:Q4416090). How can I get all the websites of senators who is currently in office? 13:02, 21 May 2020 (UTC)) talk (AntonTarasenko: Try this: AntonTarasenko@

Use at

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 distinct ?person ?personLabel ?official_website WHERE {
  ?person wdt:P31 wd:Q5 . ?person p:P39 ?statement.
  ?statement ps:P39 wd:Q4416090. 
  filter not exists { ?statement pq:P582 ?endtime.}
  ?person wdt:P856 ?official_website.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?endtime") v4("?official_website"):::projected v3("?person"):::projected v1("?statement") c9(["bd:serviceParam"]):::iri c6(["wd:Q4416090"]):::iri c3(["wd:Q5"]):::iri c11(["en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:qualifier/P582"--> e0v2 e0v2("?endtime"):::projected e0v1("?statement"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 v1 --"p:qualifier/P582"--> v2 v3 --"p:direct/P31"--> c3 v3 --"p:P39"--> v1 v1 --"p:statement/P39"--> c6 v3 --"p:direct/P856"--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end