query-fa72781dee71cfa7d52877cb927e18a0

rq turtle/ttl

...and here is another request listing flag colors for every country.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?drapeau ?drapeauLabel ?couleur ?couleurLabel ?territoire ?territoireLabel ?iso2 ?iso2Label ?iso3 ?iso3Label
WHERE
{
  ?drapeau wdt:P31/wdt:P279* wd:Q186516;
          wdt:P462 ?couleur.

   OPTIONAL{?drapeau wdt:P1001 ?territoire.}
   OPTIONAL{?territoire wdt:P297 ?iso2.}
   OPTIONAL{?territoire wdt:P298 ?iso3.}

   VALUES ?couleur {wd:Q3142 wd:Q1088 wd:Q23444 wd:Q3133 wd:Q943 wd:Q23445 wd:Q39338}.


  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; v6("?couleur"):::projected v1("?drapeau"):::projected v4("?iso2"):::projected v5("?iso3"):::projected v3("?territoire"):::projected a1((" ")) c9(["bd:serviceParam"]):::iri c3(["wd:Q186516"]):::iri c11(["#91;AUTO_LANGUAGE#93;, en"]):::literal v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 --"wdt:P462"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1001".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P297".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P298".-> v5 end bind0[/VALUES ?couleur/] bind0-->v6 bind00(["wd:Q3142"]) bind00 --> bind0 bind01(["wd:Q1088"]) bind01 --> bind0 bind02(["wd:Q23444"]) bind02 --> bind0 bind03(["wd:Q3133"]) bind03 --> bind0 bind04(["wd:Q943"]) bind04 --> bind0 bind05(["wd:Q23445"]) bind05 --> bind0 bind06(["wd:Q39338"]) bind06 --> bind0 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end