query-c661dbfd859a7c2f5057e990165d671b

rq turtle/ttl

Female MLAs of Odisha SELECT ?item ?itemLabel ?start ?end ?partyLabel ?constituencyLabel WHERE { ?item wdt:P31 wd:Q5. ?item wdt:P21 wd:Q6581072. #<<< Gender = Female ?item p:P39 ?statement. ?statement (ps:P39/wdt:P279*) wd:Q24546266. OPTIONAL { ?statement pq:P580 ?start. } OPTIONAL { ?statement pq:P582 ?end. } OPTIONAL { ?statement pq:P768 ?constituency. } OPTIONAL { ?statement pq:P4100 ?party. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY ?itemLabel

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#>
# Female MLAs of Odisha
SELECT ?item ?itemLabel ?start ?end ?partyLabel ?constituencyLabel 
WHERE {
  ?item wdt:P31 wd:Q5.
  ?item wdt:P21 wd:Q6581072.    #<<< Gender = Female
  ?item p:P39 ?statement.
       ?statement (ps:P39/wdt:P279*) wd:Q24546266.
  OPTIONAL { ?statement pq:P580 ?start. }
  OPTIONAL { ?statement pq:P582 ?end. }
  OPTIONAL { ?statement pq:P768 ?constituency. }
  OPTIONAL { ?statement pq:P4100 ?party. }
  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; v6("?constituency") v5("?end"):::projected v2("?item"):::projected v1("?itemLabel"):::projected v7("?party") v4("?start"):::projected v3("?statement") a1((" ")) c4(["wd:Q6581072"]):::iri c8(["wd:Q24546266"]):::iri c14(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"p:direct/P31"--> c2 v2 --"p:direct/P21"--> c4 v2 --"p:P39"--> v3 v3 --"p:statement/P39"--> a1 a1 --"p:direct/P279"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P580".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P582".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P768".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P4100".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end