query-73e7996a75961b5352afd6b098c78cf7

rq turtle/ttl

Feminine demonymsHi, I wanted to run but it does not work, any guess?

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#>
SELECT ?gare_ferroviaire ?gare_ferroviaireLabel ?gare_ferroviaireDescription ?female_statement ?paysLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
  ?gare_ferroviaire wdt:P31 wd:Q55488.
  MINUS { ?gare_ferroviaire wdt:P5817 ?état_d_usage. }
  OPTIONAL { ?gare_ferroviaire wdt:P17 ?pays.}
    OPTIONAL {
    ?pays p:P1549 ?female_statement .
    ?female_statement (pq:P366|pq:P518) ?female_val; ps:P1549 ?female .
    FILTER( LANG( ?female ) = 'fr' ) .
    MINUS { ?female_statement (pq:P366|pq:P518) wd:Q146786 } .
  } .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?female") v5("?female_statement"):::projected v6("?female_val") v1("?gare_ferroviaire"):::projected v3("?pays") v2("?état_d_usage") c13(["wd:Q146786"]):::iri c4(["fr"]):::literal c2(["bd:serviceParam"]):::iri c6(["wd:Q55488"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"p:direct/P31"--> c6 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"p:direct/P5817"--> v2 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P17".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; f1[["?female = 'fr'"]] f1 --> v4 v3 -."p:P1549".-> v5 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v5 --"p:qualifier/P518"--> v6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v5 --"p:qualifier/P366"--> v6 end union0r <== or ==> union0l end v5 --"p:statement/P1549"--> v4 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v5 --"p:qualifier/P518"--> c13 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v5 --"p:qualifier/P366"--> c13 end union1r <== or ==> union1l end end end