query-37885d84bb42032832944ac8621416c9

rq turtle/ttl

Items that are linked only to Bulgarian Wikipedia and to not have instance of and subclass of as well), I need that item excluded. Could you help me with that please? https://bg.wikipedia.org/ (regardless if it has to https://en.wikipedia.org/Hi guys. I have a query that displays all the items that do not have "instance of" and "subclass of", and that have wikilink to the Bulgarian Wikipedia. I need the same list, but with excluded items that have links to any other Wikipedias. Like, if an item have wikilink to

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX schema: <http://schema.org/>

#items without instance of and subclass of
SELECT ?item ?statements (COUNT(DISTINCT ?sitelink) AS ?sites) ?itemLabel WHERE {
  ?wikilink schema:about ?item.
  ?wikilink schema:isPartOf <https://bg.wikipedia.org/>.
  ?item wikibase:sitelinks _:b4.
  MINUS { ?item (wdt:P31|wdt:P279) _:b5. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "bg". }
  ?item wikibase:statements ?statements.
  OPTIONAL {
    ?sitelink schema:about ?item.
    ?sitelink schema:inLanguage ?lang.
  }
}
GROUP BY ?item ?statements ?itemLabel
ORDER BY ?sites

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v6("?lang") v5("?sitelink"):::projected v7("?sites") v4("?statements"):::projected v2("?wikilink") a1((" ")) a2((" ")) c8(["bd:serviceParam"]):::iri c10(["bg"]):::literal c3([https://bg.wikipedia.org/]):::iri v2 --"schema:about"--> v3 v2 --"schema:isPartOf"--> c3 v3 --"wikibase:sitelinks"--> a1 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P279"--> a2 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P31"--> a2 end union0r <== or ==> union0l end end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end v3 --"wikibase:statements"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."schema:about".-> v3 v5 --"schema:inLanguage"--> v6 end bind2[/"count(?sitelink)"/] v5 --o bind2 bind2 --as--o v7