query-b8b9a3a1c88a4832a5b2ac317a4dc300

rq turtle/ttl

Broad query for LGBTQ+ folks in Occitanie without a article in french

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel  ?genreLabel ?orientationLabel WHERE {
  # personne né dans une ville dans l'occitanie
  ?item wdt:P31 wd:Q5 ;
        # enchaine les propriétés
        wdt:P19 [ wdt:P131 [ wdt:P131 wd:Q18678265 ] ] .

  # https://en.wikibooks.org/wiki/SPARQL/UNION
  {
    # tout
    ?item wdt:P21 ?genre .
    # sauf les cis
    MINUS {
      ?item wdt:P21 wd:Q6581097 .
    }
    MINUS {
      ?item wdt:P21 wd:Q6581072 .
    }
  }
  UNION
  {
    # tout, sauf les heteros
    ?item wdt:P91 ?orientation .
    MINUS {
      ?iteam wdt:P91 wd:Q1035954 .  
    }
  }
  # retire les items avec un lien en francais
  MINUS {
    ?link schema:about ?item ;
          schema:inLanguage "fr" .
  }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?genre") v4("?iteam") v1("?item"):::projected v5("?link") v3("?orientation") a2((" ")) a1((" ")) c7(["wd:Q6581097"]):::iri c8(["wd:Q6581072"]):::iri c13(["fr"]):::literal c15(["bd:serviceParam"]):::iri c4(["wd:Q18678265"]):::iri c2(["wd:Q5"]):::iri c17(["fr,en"]):::literal c10(["wd:Q1035954"]):::iri v1 --"wdt:P31"--> c2 a1 --"wdt:P131"--> c4 a2 --"wdt:P131"--> a1 v1 --"wdt:P19"--> a2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P91"--> v3 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v4 --"wdt:P91"--> c10 end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P21"--> v2 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P21"--> c7 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P21"--> c8 end end union0r <== or ==> union0l end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v5 --"schema:about"--> v1 v5 --"schema:inLanguage"--> c13 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c15 --"wikibase:language"--> c17 end