query-681edfe1b4241e8e2fe4a17b6b0da58c

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?Org ?OrgLabel ?StockExchange ?StockExchangeLabel ?Ceo ?CeoLabel ?Subsidiary ?SubsidiaryLabel ?Ticker
WHERE {
  ?Org p:P414 ?SE . # look for an entity with a "stock exchange" statement
  ?SE ps:P414 ?StockExchange . # of which we get the value
  ?SE pq:P249 ?Ticker . # and the "ticker symbol" qualifier
  # Add new fields
  ?Org p:P169 ?Ceo .        # Entity has Ceo
  ?Org p:P355 ?Subsidiary . # Entity has Subsidiary
  FILTER(?Ticker="FB") . #and we restrict the value of that qualifier to "FB"
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?Ceo"):::projected v2("?Org"):::projected v3("?SE") v4("?StockExchange"):::projected v6("?Subsidiary"):::projected v1("?Ticker"):::projected c8(["bd:serviceParam"]):::iri c10(["en"]):::literal f0[["?Ticker = 'FB'"]] f0 --> v1 v2 --"p:P414"--> v3 v3 --"p:statement/P414"--> v4 v3 --"p:qualifier/P249"--> v1 v2 --"p:P169"--> v5 v2 --"p:P355"--> v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end