query-c064b1003f91a33d7d468ec973bd8ac5
Members of the Tweede Kamer at some point in time and I'm trying to make a query to show the members at a point in time. I got the two parts working (Q18887908)member of the House of Representatives of the Netherlands I'm working on People where the point in time is between the time they entered and left.
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 ?item ?itemLabel WHERE {
BIND("2010-05-00T00:00:00Z"^^xsd:dateTime AS ?pointintime) .
?item p:P39 ?positionstatement .
?positionstatement ps:P39 wd:Q18887908 .
?positionstatement pq:P580 ?startdate .
?positionstatement pq:P582 ?enddate .
FILTER(?startdate < ?pointintime && ?pointintime < ?enddate ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?enddate")
v5("?item"):::projected
v1("?itemLabel"):::projected
v5("?pointintime")
v6("?positionstatement")
v2("?startdate")
c7(["bd:serviceParam"]):::iri
c9(["en"]):::literal
c3(["wd:Q18887908"]):::iri
f0[["?startdate < ?pointintime?pointintime < ?enddate"]]
f0 --> v2
f0 --> v5
f0 --> v4
bind1[/"'2010-05-00T00:00:00Z^^xsd:dateTime'"/]
bind1 --as--o v5
v5 --"p:P39"--> v6
v6 --"p:statement/P39"--> c3
v6 --"p:qualifier/P580"--> v2
v6 --"p:qualifier/P582"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end