query-23e6f6d83a5ead60edbeed812f2df9e2
Help optimizing queryI need help optimizing this query to take less than timeout.
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT (COUNT(DISTINCT ?director_de_cine) AS ?count) WHERE {
?director_de_cine (wdt:P106*) wd:Q2526255;
wdt:P21 wd:Q6581072.
?sitelink schema:about ?article;
schema:isPartOf <https://es.wikipedia.org/>.
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?article")
v4("?count")
v1("?director_de_cine"):::projected
v2("?sitelink")
c2(["wd:Q2526255"]):::iri
c7([https://es.wikipedia.org/]):::iri
c4(["wd:Q6581072"]):::iri
v1 --"wdt:P106"--> c2
v1 --"wdt:P21"--> c4
v2 --"schema:about"--> v3
v2 --"schema:isPartOf"--> c7
bind1[/"count(?director_de_cine)"/]
v1 --o bind1
bind1 --as--o v4