query-b46d21f122117b5f8cbcd099c6deefe5

rq turtle/ttl

Help with SPARQL query that have a sitelink with eswiki but no spanish label that doesn't time out. This is what I've got, but I don't know how to edit it to avoid the timeout: (Q4167836)Wikimedia category of (P31)instance of Hi, I'm having problems trying to get a SPARQL query to get entities that are

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?i ?article ?label_es WHERE {
  ?i wdt:P31 wd:Q4167836;
    ^schema:about ?article.
  ?article schema:isPartOf <https://es.wikipedia.org/>.
  FILTER(NOT EXISTS {
    ?i rdfs:label ?label_es.
    FILTER((LANG(?label_es)) = "es")
  })
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?article"):::projected v2("?i"):::projected v1("?label_es"):::projected c7([https://es.wikipedia.org/]):::iri c4(["wd:Q4167836"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?label_es = 'es'"]] e0f0 --> e0v1 e0v2 --"rdfs:label"--> e0v1 e0v2("?i"):::projected e0v1("?label_es"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> c2 f1[["?label_es = 'es'"]] f1 --> v1 v2 --"rdfs:label"--> v1 v2 --"wdt:P31"--> c4 v3 --"schema:about"--> v2 v3 --"schema:isPartOf"--> c7