query-058220e06629a34418b1eabe1b28d09b

rq turtle/ttl

Show all members of parlament that dose not have twitter account.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?party ?partyLabel ?gender WHERE {
   ?item p:P39 ?statement.
   ?statement ps:P39 wd:Q9045502.
   ?statement pq:P2937 wd:Q108535431
   MINUS {
   ?item wdt:P2002 ?username . # select best only
   ?item p:P2002 ?ts . ?ts ps:P2002 ?username . optional { ?ts pq:P3744 ?followers . }
   optional {   ?ts prov:wasDerivedFrom [ pr:P813 ?date ] . }
   }                       .        
   ?item wdt:P102 ?party.
   ?party rdfs:label ?partyLabel.
   FILTER (lang(?partyLabel) = 'en')
   ?item wdt:P21 ?gender.
   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; v7("?date") v6("?followers") v9("?gender"):::projected v2("?item"):::projected v8("?party"):::projected v1("?partyLabel"):::projected v3("?statement") v5("?ts") v4("?username") a1((" ")) c4(["wd:Q9045502"]):::iri c6(["wd:Q108535431"]):::iri c17(["bd:serviceParam"]):::iri c19(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?partyLabel = 'en'"]] f0 --> v1 v2 --"p:P39"--> v3 v3 --"p:statement/P39"--> c4 v3 --"p:qualifier/P2937"--> c6 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P2002"--> v4 v2 --"p:P2002"--> v5 v5 --"p:statement/P2002"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:qualifier/P3744".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; a1 -."p:reference/P813".-> v7 v5 --"prov:wasDerivedFrom"--> a1 end end v2 --"p:direct/P102"--> v8 v8 --"rdfs:label"--> v1 v2 --"p:direct/P21"--> v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c17 --"wikibase:language"--> c19 end