query-a9e3dc992311a5f41b7bcdcef9af9a04

rq turtle/ttl

Humans SELECT ?item ?itemLabel WHERE { #Item Property Value ?item wdt:P31 wd:Q5 . # all the items with instance of value human ?item wdt:P27 wd:Q30 . # and who are citizens of the USA ?item wdt:P106 wd:Q1930187 . #and who are journalists Minus { ?item wdt:P19 wd:Q1297 . # who were born in Chicago }

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Humans
SELECT ?item ?itemLabel 
WHERE 
{
  #Item Property Value
  ?item wdt:P31 wd:Q5 . # all the items with instance of value human
  ?item wdt:P27 wd:Q30 . # and who are citizens of the USA
  ?item wdt:P106 wd:Q1930187 . #and who are journalists
  Minus {
  ?item wdt:P19 wd:Q1297 . # who were born in Chicago
  }

  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; v1("?item"):::projected c6(["wd:Q1930187"]):::iri c10(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c4(["wd:Q30"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal c8(["wd:Q1297"]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P27"--> c4 v1 --"wdt:P106"--> c6 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P19"--> c8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end