query-9442fe75037e613fc21cada8fe968861

rq turtle/ttl

members of the 17th Odisha Assembly (2024-29). SELECT DISTINCT ?item ?itemLabel ?constituencyLabel ?partyLabel ?replaces ?electionLabel { ?item p:P39 ?positionStatement . ?positionStatement ps:P39 wd:Q61479185 . OPTIONAL { ?positionStatement pq:P768 ?constituency . } OPTIONAL { ?positionStatement pq:P4100|pq:P102 ?party . } OPTIONAL { ?positionStatement pq:P1365 ?replaces . } OPTIONAL { ?positionStatement pq:P2715 ?election . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en". } } ORDER BY ?itemLabel

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#>
# members of the 17th Odisha Assembly (2024-29).
SELECT DISTINCT ?item ?itemLabel ?constituencyLabel ?partyLabel ?replaces ?electionLabel
{
 ?item p:P39 ?positionStatement .
 ?positionStatement ps:P39 wd:Q61479185 . 
 OPTIONAL { ?positionStatement pq:P768 ?constituency . }
 OPTIONAL { ?positionStatement pq:P4100|pq:P102 ?party . }
 OPTIONAL { ?positionStatement pq:P1365 ?replaces . }
 OPTIONAL { ?positionStatement pq:P2715 ?election . }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en". }
}
ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?constituency") v7("?election") v2("?item"):::projected v1("?itemLabel"):::projected v5("?party") v3("?positionStatement") v6("?replaces"):::projected c3(["wd:Q61479185"]):::iri c10(["bd:serviceParam"]):::iri c12(["#91;AUTO_LANGUAGE#93;, en"]):::literal v2 --"p:P39"--> v3 v3 --"p:statement/P39"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P768".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 -."p:qualifier/P102".-> v5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"p:qualifier/P4100"--> v5 end union0r <== or ==> union0l end end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P1365".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P2715".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end