query-f782aa04b2899701180c42926552fcd5
TODO
Use at
- https://query.wikidata.org/sparql
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#>
#TreeMap of members of the 16th Lok Sabha by state
#Credit: Mahir256
#defaultView:TreeMap
SELECT ?state ?stateLabel ?item ?itemLabel{
?item p:P39 ?pstmt.
?pstmt ps:P39 wd:Q42509248 ; pq:P768 ?dst. ?dst wdt:P131+ ?state. ?state wdt:P31/wdt:P279 wd:Q131541.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?dst")
v1("?item"):::projected
v2("?pstmt")
v4("?state"):::projected
a1((" "))
c3(["wd:Q42509248"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c8(["wd:Q131541"]):::iri
v1 --"p:P39"--> v2
v2 --"p:statement/P39"--> c3
v2 --"p:qualifier/P768"--> v3
v3 --"p:direct/P131"--> v4
v4 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end