query-1f26e59f47e5af09dc7af9d6fa0d3b05
Dresdner Unternehmen der Tabakindustrie (Headquarter) SELECT ?item ?itemLabel ?street ?coord ?founded ?dissolved ?legalformLabel WHERE { ?item wdt:P31 wd:Q4830453. ?item wdt:P159 wd:Q1731. ?item wdt:P452 wd:Q907703. ?item wdt:P571 ?inception. optional { ?item wdt:P1454 ?legalform. } optional { ?item wdt:P576 ?dissolvedYear. } optional { ?item p:P159 [ pq:P625 ?coord; pq:P6375 ?street;]
}
BIND(str(YEAR(?inception)) AS ?founded) BIND(str(YEAR(?dissolvedYear)) AS ?dissolved) FILTER (?inception >= "1860-01-01T00:00:00Z"^^xsd:dateTime && ?inception <= "2020-01-01T00:00:00Z"^^xsd:dateTime) . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
} ORDER BY (?founded)
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Dresdner Unternehmen der Tabakindustrie (Headquarter)
SELECT ?item ?itemLabel ?street ?coord ?founded ?dissolved ?legalformLabel
WHERE
{
?item wdt:P31 wd:Q4830453.
?item wdt:P159 wd:Q1731.
?item wdt:P452 wd:Q907703.
?item wdt:P571 ?inception.
optional {
?item wdt:P1454 ?legalform.
}
optional {
?item wdt:P576 ?dissolvedYear.
}
optional {
?item p:P159 [ pq:P625 ?coord; pq:P6375 ?street;]
}
BIND(str(YEAR(?inception)) AS ?founded)
BIND(str(YEAR(?dissolvedYear)) AS ?dissolved)
FILTER (?inception >= "1860-01-01T00:00:00Z"^^xsd:dateTime && ?inception <= "2020-01-01T00:00:00Z"^^xsd:dateTime) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
} ORDER BY (?founded)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?coord"):::projected
v8("?dissolved"):::projected
v5("?dissolvedYear")
v8("?founded"):::projected
v2("?inception")
v3("?item"):::projected
v4("?legalform")
v7("?street"):::projected
a1((" "))
c18(["#91;AUTO_LANGUAGE#93;,de"]):::literal
c4(["wd:Q4830453"]):::iri
c8(["wd:Q907703"]):::iri
c16(["bd:serviceParam"]):::iri
c6(["wd:Q1731"]):::iri
f0[["?inception >= '1860-01-01T00:00:00Z^^xsd:dateTime'?inception <= '2020-01-01T00:00:00Z^^xsd:dateTime'"]]
f0 --> v2
v3 --"p:direct/P31"--> c4
v3 --"p:direct/P159"--> c6
v3 --"p:direct/P452"--> c8
v3 --"p:direct/P571"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P1454".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P576".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
a1 -."p:qualifier/P625".-> v6
a1 --"p:qualifier/P6375"--> v7
v3 --"p:P159"--> a1
end
bind1[/"str(year-from-dateTime(?inception))"/]
v2 --o bind1
bind1 --as--o v8
bind2[/"str(year-from-dateTime(?dissolvedYear))"/]
v5 --o bind2
bind2 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c16 --"wikibase:language"--> c18
end