query-08f919c7ca3b87e8824d512fc96bdf1b

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?name ?wikipage ?founded (GROUP_CONCAT(?industryLabel; SEPARATOR=', ') AS ?industries)
WHERE
{
  ?item wdt:P31/wdt:P279* wd:Q783794. # is company
  ?item wdt:P17 wd:Q30. # in US
  ?wikipage schema:about ?item. # Wiki pages for the company
  ?item wdt:P452 ?industry. # industry
  OPTIONAL { ?item wdt:P571 ?founded. } # inception
  SERVICE wikibase:label
  {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
    ?industry rdfs:label ?industryLabel.
    ?item rdfs:label ?name.
  }
}
GROUP BY ?item ?name ?founded ?wikipage

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?founded"):::projected v7("?industries") v3("?industry") v5("?industryLabel"):::projected v1("?item"):::projected v6("?name"):::projected v2("?wikipage"):::projected a1((" ")) c5(["wd:Q30"]):::iri c3(["wd:Q783794"]):::iri c10(["bd:serviceParam"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 --"wdt:P17"--> c5 v2 --"schema:about"--> v1 v1 --"wdt:P452"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P571".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 v3 --"rdfs:label"--> v5 v1 --"rdfs:label"--> v6 end bind1[/"?industryLabel"/] v5 --o bind1 bind1 --as--o v7