query-227e303f76c2fd0c367bd63e77e007df

rq turtle/ttl

Finding items with articles in any Wikipedia but no in other projects (Documentation about schema:X usage)Hi there, I'm trying to get people from a given country with sitelinks to Wikipedia, but not to other Wikimedia projects. With this query I can get all people from Q298, with sitelinks;

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 ?itemDescription  ?article 
WHERE {
  ?item wdt:P31 wd:Q5;
    wdt:P27 wd:Q298.
    ?article schema:about ?item
    SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en". }

}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?article"):::projected v1("?item"):::projected c7(["bd:serviceParam"]):::iri c9(["es,en"]):::literal c2(["wd:Q5"]):::iri c4(["wd:Q298"]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P27"--> c4 v2 --"schema:about"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end