query-f51311ac8a4a91343167f4c026ccb200
Architectural structure on my list also. (Q48690925)Centrální kotelna . So I want (P279)subclass of as (Q811979)architectural structure has (Q41176)building and (P279)subclass of as (Q41176)building has (Q1739809)boiler house and (Q1739809)boiler house = (P31)instance of , where (Q48690925)Centrální kotelna . Unfortunately, my query cannot proceed before timeout. Why? Is my query correct? E.g. I have (Q2444636)Prague 2 in s(Q811979)architectural structure I am trying to list
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#>
SELECT ?archstruct ?archstructLabel ?something ?something2 WHERE {
?archstruct wdt:P131 wd:Q2444636. #architectural structure located in Prague 2
{ ?archstruct wdt:P31 ?something. #architectural structure is something
?somehting wdt:P31 wd:Q811979.} #and "something" is architectural structure, or...
UNION
{
?something wdt:P31 ?something2. #...something2
?something2 wdt:P31 wd:Q811979. #something2 is srchitectural structure
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],cs". }
}
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?archstruct"):::projected
v3("?somehting")
v2("?something"):::projected
v4("?something2"):::projected
c8(["#91;AUTO_LANGUAGE#93;,cs"]):::literal
c2(["wd:Q2444636"]):::iri
c6(["bd:serviceParam"]):::iri
c4(["wd:Q811979"]):::iri
v1 --"wdt:P131"--> c2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> v4
v4 --"wdt:P31"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> v2
v3 --"wdt:P31"--> c4
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end