query-389b50e60176741389ad7c197b6fef0d
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.
?industry rdfs:label ?industryLabel.
FILTER(LANG(?industryLabel)="en")
}.
OPTIONAL {
?organization wdt:P749 ?parent.
?parent rdfs:label ?parentLabel.
FILTER(LANG(?parentLabel)="en")
}.
OPTIONAL {
?organization wdt:P355 ?subsiduary.
?subsiduary rdfs:label ?subsiduaryLabel.
FILTER(LANG(?subsiduaryLabel)="en")
}.
?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 "en".}
}
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
v6("?country")
v11("?event")
v7("?inception"):::projected
v12("?industries")
v8("?industry")
v4("?industryLabel"):::projected
v5("?organization"):::projected
v9("?parent")
v3("?parentLabel"):::projected
v13("?parents")
v14("?subsiduaries")
v10("?subsiduary")
v2("?subsiduaryLabel"):::projected
a1((" "))
c16(["wd:Q96175652"]):::iri
c1(["en"]):::literal
c4(["wd:Q43229"]):::iri
c18(["bd:serviceParam"]):::iri
c13(["wd:Q152074"]):::iri
v5 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P17".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P571".-> v7
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P452".-> v8
v8 --"rdfs:label"--> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P749".-> v9
v9 --"rdfs:label"--> v3
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:direct/P355".-> v10
v10 --"rdfs:label"--> v2
end
v5 --"p:P793"--> v11
v11 --"p:statement/P793"--> c13
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v11 -."p:qualifier/P585".-> v1
end
v11 --"p:qualifier/P828"--> c16
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c18 --"wikibase:language"--> c1
end
bind3[/"?industryLabel"/]
v4 --o bind3
bind3 --as--o v12
bind4[/"?parentLabel"/]
v3 --o bind4
bind4 --as--o v13
bind5[/"?subsiduaryLabel"/]
v2 --o bind5
bind5 --as--o v14