query-5f6dfdf69ec035ead472444803c9fca9
Items with sitelinks only in wikinews SELECT DISTINCT ?item ?itemLabel ?title WHERE { { SELECT ?item ?title WHERE { ?article a schema:Article; schema:isPartOf ?wiktionary; schema:inLanguage "ru" ; schema:about ?item ; schema:name ?title. ?wiktionary wikibase:wikiGroup "wikinews". FILTER(contains(?title, "Категория:")) . } } MINUS { ?otherArticle a schema:Article; schema:isPartOf ?otherProject; schema:about ?item. ?otherProject wikibase:wikiGroup ?otherGroup. FILTER(?otherGroup != "wikinews") }
MINUS { ?item wdt:P31/wdt:P279* wd:Q14204246. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ru,en". } }
Use at
- https://query.wikidata.org/sparql
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#>
#Items with sitelinks only in wikinews
SELECT DISTINCT ?item ?itemLabel ?title WHERE {
{
SELECT ?item ?title WHERE {
?article a schema:Article;
schema:isPartOf ?wiktionary;
schema:inLanguage "ru" ;
schema:about ?item ;
schema:name ?title.
?wiktionary wikibase:wikiGroup "wikinews".
FILTER(contains(?title, "Категория:")) .
}
}
MINUS {
?otherArticle a schema:Article;
schema:isPartOf ?otherProject;
schema:about ?item.
?otherProject wikibase:wikiGroup ?otherGroup.
FILTER(?otherGroup != "wikinews")
}
# MINUS { ?item wdt:P31/wdt:P279* wd:Q14204246. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ru,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?article")
v4("?item"):::projected
v6("?otherArticle")
v5("?otherGroup")
v7("?otherProject")
v1("?title"):::projected
v3("?wiktionary")
c3(["schema:Article"]):::iri
c6(["ru"]):::literal
c10(["wikinews"]):::literal
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,ru,en"]):::literal
f0[["contains(?title,'Категория:')"]]
f0 --> v1
v2 --"a"--> c3
v2 --"schema:isPartOf"--> v3
v2 --"schema:inLanguage"--> c6
v2 --"schema:about"--> v4
v2 --"schema:name"--> v1
v3 --"wikibase:wikiGroup"--> c10
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
f2[["?otherGroup != 'wikinews'"]]
f2 --> v5
v6 --"a"--> c3
v6 --"schema:isPartOf"--> v7
v6 --"schema:about"--> v4
v7 --"wikibase:wikiGroup"--> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end