query-310d8baaee2befef90dccc540ac4efc2
Wikidata Items of a certain Wikipedia article without any Wikibase Statement 21:15, 31 May 2022 (UTC)) talk (Mfchris84I want to get all Wikidata Items with a sitelink to (German) Wikipedia without any Wikibase Statement. I tried the following one, running - no surprise - in a timeout. Has someone an idea, if this could be done more slightly? Best --
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX schema: <http://schema.org/>
SELECT DISTINCT (COUNT(?property) AS ?NoP) ?wpPage ?item WHERE {
?wpPage schema:about ?item;
schema:isPartOf <https://de.wikipedia.org/>.
?item ?property _:b8.
?propertyItem wikibase:directClaim ?property.
}
GROUP BY ?wpPage ?item
HAVING (?NoP = 0)
LIMIT 6
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?NoP")
v3("?item"):::projected
v4("?property"):::projected
v5("?propertyItem")
v2("?wpPage"):::projected
a1((" "))
c4([https://de.wikipedia.org/]):::iri
f0[["?NoP = '0^^xsd:integer'"]]
f0 --> v6
v2 --"schema:about"--> v3
v2 --"schema:isPartOf"--> c4
v3 -->v4--> a1
v5 --"wikibase:directClaim"--> v4
bind2[/"count(?property)"/]
v4 --o bind2
bind2 --as--o v6