query-29e99bd243adc3c979fc79561be19076
SPARQL query
Use at
- https://query.wikidata.org/sparql
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/>
SELECT ?wikidata_id ?name ?url ?start ?end WHERE {
BIND (wd:Q55465119 as ?legislature) .
?member wdt:P361 ?legislature ;
MINUS {?member wdt:P576 [] }
MINUS { ?legislature wdt:P576 [] }
?node ps:P39 ?member .
OPTIONAL { ?node pq:P580 ?start }
OPTIONAL { ?node pq:P582 ?end }
?node ps:P39 ?position .
?position wdt:P31 ?positiontype .
?wikidata_id p:P39 ?node .
OPTIONAL {
?wikidata_id p:P973 ?describedAt .
?describedAt ps:P973 ?url .
OPTIONAL {
?describedAt pq:P1810 ?name .
}
FILTER(CONTAINS(LCASE(STR(?url)), "democracy.leeds.gov.uk/"))
}
}
ORDER BY ?wikidata_id
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v10("?describedAt")
v7("?end"):::projected
v3("?legislature")
v4("?member")
v11("?name"):::projected
v5("?node")
v8("?position")
v9("?positiontype")
v6("?start"):::projected
v2("?url"):::projected
v1("?wikidata_id"):::projected
a1((" "))
a2((" "))
bind0[/"'wd:Q55465119'"/]
bind0 --as--o v3
v4 --"p:direct/P361"--> v3
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v4 --"p:direct/P576"--> a1
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v3 --"p:direct/P576"--> a2
end
v5 --"p:statement/P39"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P580".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P582".-> v7
end
v5 --"p:statement/P39"--> v8
v8 --"p:direct/P31"--> v9
v1 --"p:P39"--> v5
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:P973".-> v10
v10 --"p:statement/P973"--> v2
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v10 -."p:qualifier/P1810".-> v11
end
end