query-51625d40c06c576859447e00143ea980

rq turtle/ttl

ImageGrid viewFlags with Union Flag canton

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#>
# flags featuring the Union Jack as a canton (the top inner corner of a flag)
#defaultView:ImageGrid
SELECT ?flag ?flagLabel ?image WHERE {
  ?flag wdt:P31/wdt:P279* wd:Q186516;
        p:P180 [
          ps:P180 wd:Q3173323;
          pq:P518|pq:P1354 wd:Q1559605
        ].
  OPTIONAL { ?flag wdt:P18 ?image. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?flag"):::projected v2("?image"):::projected a1((" ")) a2((" ")) c5(["wd:Q3173323"]):::iri c3(["wd:Q186516"]):::iri c12(["bd:serviceParam"]):::iri c7(["wd:Q1559605"]):::iri c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c3 a2 --"p:statement/P180"--> c5 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; a2 --"p:qualifier/P1354"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; a2 --"p:qualifier/P518"--> c7 end union0r <== or ==> union0l end v1 --"p:P180"--> a2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P18".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end