query-60526a3d4e1889497069e205654de0d0
, which might be the bottleneck. I tried https://query.wikidata.org/sparqlseem to time out, so I tried to develop a query where I can control how many items are send to SERVICE <
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT ?redirect_from ?redirect_to ?count
WHERE {
{
SELECT (COUNT(DISTINCT(?file)) AS ?count) ?redirect_from {
?file wdt:P180 ?redirect_from .
} GROUP BY ?redirect_from
ORDER BY ASC(?count)
LIMIT 50
}.
SERVICE <https://query.wikidata.org/sparql> {
?redirect_from owl:sameAs ?redirect_to .
#FILTER( ?redirect_fromĀ != ?redirect_to ) .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count"):::projected
v2("?file")
v3("?redirect_from"):::projected
v4("?redirect_to"):::projected
v2 --"wdt:P180"--> v3
bind1[/"count(?file)"/]
v2 --o bind1
bind1 --as--o v4
subgraph s1["https://query.wikidata.org/sparql"]
style s1 stroke-width:4px;
v3 --"owl:sameAs"--> v4
end