query-07da68b0c71cec10f7fa72e1348e4fb6
Sitelinks, featured, badges
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 bd: <http://www.bigdata.com/rdf#>
PREFIX schema: <http://schema.org/>
# Featured/Good articles in one language that don't have a French Wikipedia page
SELECT DISTINCT ?item ?itemLabel WHERE {
?featuredArticle schema:about ?item.
?featuredArticle schema:inLanguage "ru".
?featuredArticle wikibase:badge ?badgeValues.
?item wdt:P31 wd:Q5.
?item wdt:P21 wd:Q6581072.
VALUES (?badgeValues) {
(wd:Q17437796)
(wd:Q17437798)
}
OPTIONAL {
?sitelink schema:about ?item.
?sitelink schema:inLanguage "fr".
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,ru". }
FILTER(!BOUND(?sitelink))
}
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?badgeValues")
v3("?featuredArticle")
v4("?item"):::projected
v1("?itemLabel"):::projected
v2("?sitelink")
c3(["ru"]):::literal
c8(["wd:Q6581072"]):::iri
c9(["fr"]):::literal
c11(["bd:serviceParam"]):::iri
c13(["fr,en,ru"]):::literal
c6(["wd:Q5"]):::iri
f0[["not bound(?sitelink)"]]
f0 --> v2
v3 --"schema:about"--> v4
v3 --"schema:inLanguage"--> c3
v3 --"wikibase:badge"--> v6
v4 --"wdt:P31"--> c6
v4 --"wdt:P21"--> c8
bind1[/VALUES ?badgeValues/]
bind1-->v6
bind10(["wd:Q17437796"])
bind10 --> bind1
bind11(["wd:Q17437798"])
bind11 --> bind1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."schema:about".-> v4
v2 --"schema:inLanguage"--> c9
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end