query-1307037f664ae915138409b6fa8c7b2c

rq turtle/ttl

TODO

Use at

PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?olimpbase ?snak { 
  { ?item p:P3940/ps:P3940 ?olimpbase . BIND('mainsnak' AS ?snak) } UNION 
  { ?item ?anyprop [ pq:P3940 ?olimpbase ] . BIND('qualifier' AS ?snak) } UNION
  { ?item ?anyprop [ prov:wasDerivedFrom [ pr:P3940 ?olimpbase ] ] . BIND('reference' AS ?snak) }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?anyprop") v1("?item"):::projected v2("?olimpbase"):::projected v5("?snak"):::projected a1((" ")) a2((" ")) a4((" ")) a3((" ")) subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; a3 --"p:reference/P3940"--> v2 a4 --"prov:wasDerivedFrom"--> a3 v1 -->v4--> a4 bind0[/"'reference'"/] bind0 --as--o v5 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; a2 --"p:qualifier/P3940"--> v2 v1 -->v4--> a2 bind1[/"'qualifier'"/] bind1 --as--o v5 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P3940"--> a1 a1 --"p:statement/P3940"--> v2 bind2[/"'mainsnak'"/] bind2 --as--o v5 end union0r <== or ==> union0l end