query-1c18467eedbf2cfdd7853b3b0ad65711

rq turtle/ttl

Queries All works with a Tyrion test result

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
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 ?item ?itemLabel ?resultLabel ?external_identifiers
WHERE
{
  #getting items with test results
  ?item p:P5021 ?st. ?st ps:P5021 wd:Q105701756; pq:P9259 ?result.
  #excluding television series episodes and chapters
  MINUS{?item wdt:P31/wdt:P279* wd:Q21191270}
  MINUS{?item wdt:P31/wdt:P279* wd:Q1980247}

  ?item wikibase:identifiers ?external_identifiers
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY DESC(?external_identifiers)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?external_identifiers"):::projected v2("?item"):::projected v4("?result") v3("?st") a1((" ")) a2((" ")) c13(["en"]):::literal c7(["wd:Q21191270"]):::iri c11(["bd:serviceParam"]):::iri c3(["wd:Q105701756"]):::iri c8(["wd:Q1980247"]):::iri v2 --"p:P5021"--> v3 v3 --"p:statement/P5021"--> c3 v3 --"p:qualifier/P9259"--> v4 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c7 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P31"--> a2 a2 --"p:direct/P279"--> c8 end v2 --"wikibase:identifiers"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end