query-222b51a3a43db8b76a0de3b11b2c599a
Propertiesinstance of (P31)subclass of (P279)country (P17)inception (P571)industry (P452)parent organization (P749)has subsidiary (P355)significant event (P793)point in time (P585)has cause (P828)
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?organization ?organizationLabel ?bankruptcyDate ?countryLabel ?inception (GROUP_CONCAT(DISTINCT ?industryLabel;separator=", ") AS ?industries) (GROUP_CONCAT(DISTINCT ?parentLabel;separator=", ") AS ?parents) (GROUP_CONCAT(DISTINCT ?subsiduaryLabel;separator=", ") AS ?subsiduaries) WHERE {
?organization wdt:P31/wdt:P279* wd:Q43229.
OPTIONAL { ?organization wdt:P17 ?country }.
OPTIONAL { ?organization wdt:P571 ?inception }.
OPTIONAL { ?organization wdt:P452 ?industry }.
OPTIONAL { ?organization wdt:P749 ?parent }.
OPTIONAL { ?organization wdt:P355 ?subsiduary }.
?organization p:P793 ?event.
?event ps:P793 wd:Q152074.
OPTIONAL { ?event pq:P585 ?bankruptcyDate }.
?event pq:P828 wd:Q96175652.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?organization rdfs:label ?organizationLabel.
?country rdfs:label ?countryLabel.
?industry rdfs:label ?industryLabel.
?parent rdfs:label ?parentLabel.
?subsiduary rdfs:label ?subsiduaryLabel }
}
GROUP BY ?organization ?organizationLabel ?bankruptcyDate ?countryLabel ?inception
ORDER BY DESC(?bankruptcyDate)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?bankruptcyDate"):::projected
v3("?country")
v10("?countryLabel"):::projected
v8("?event")
v4("?inception"):::projected
v14("?industries")
v5("?industry")
v11("?industryLabel"):::projected
v2("?organization"):::projected
v9("?organizationLabel"):::projected
v6("?parent")
v12("?parentLabel"):::projected
v15("?parents")
v16("?subsiduaries")
v7("?subsiduary")
v13("?subsiduaryLabel"):::projected
a1((" "))
c14(["wd:Q96175652"]):::iri
c3(["wd:Q43229"]):::iri
c16(["bd:serviceParam"]):::iri
c11(["wd:Q152074"]):::iri
c18(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P17".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P571".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P452".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P749".-> v6
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P355".-> v7
end
v2 --"p:P793"--> v8
v8 --"p:statement/P793"--> c11
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v8 -."p:qualifier/P585".-> v1
end
v8 --"p:qualifier/P828"--> c14
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c16 --"wikibase:language"--> c18
v2 --"rdfs:label"--> v9
v3 --"rdfs:label"--> v10
v5 --"rdfs:label"--> v11
v6 --"rdfs:label"--> v12
v7 --"rdfs:label"--> v13
end
bind3[/"?industryLabel"/]
v11 --o bind3
bind3 --as--o v14
bind4[/"?parentLabel"/]
v12 --o bind4
bind4 --as--o v15
bind5[/"?subsiduaryLabel"/]
v13 --o bind5
bind5 --as--o v16