query-2aaeb8fbc4c3974d5128c257a85ac9c3

rq turtle/ttl

SPARQL query

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#>
#defaultView:Tree
SELECT
  ?continent
  ?continentLabel
  ?continentLocatorMapImage
  ?country
  ?countryLabel
  ?countryFlag
  ?instanceOf
  ?instanceOfLabel
  ?software
  ?softwareLabel
  ?maintainerOrDeveloper
  ?maintainerOrDeveloperLabel
{
   {
  SELECT DISTINCT ?software {
     {
  SELECT DISTINCT ?license {
    ?license wdt:P629*/wdt:P31/wdt:P279* wd:Q3943414.
  }
}
    {?software wdt:P31/wdt:P279* wd:Q341}
    UNION
    {?software wdt:P275 ?license}
  }
}  ?software
    wdt:P126|wdt:P178 ?maintainerOrDeveloper;
    wdt:P31 ?instanceOf.
  ?maintainerOrDeveloper
    wdt:P31 wd:Q5;
    wdt:P27|wdt:P17 ?country.
  ?country wdt:P41 ?countryFlag.
  ?country wdt:P30 ?continent.
  ?continent wdt:P242 ?continentLocatorMapImage.

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?continent"):::projected v8("?continentLocatorMapImage"):::projected v5("?country"):::projected v6("?countryFlag"):::projected v4("?instanceOf"):::projected v1("?license") v3("?maintainerOrDeveloper"):::projected v2("?software"):::projected a1((" ")) a2((" ")) a3((" ")) c4(["wd:Q3943414"]):::iri c16(["bd:serviceParam"]):::iri c18(["#91;AUTO_LANGUAGE#93;"]):::literal c9(["wd:Q5"]):::iri c5(["wd:Q341"]):::iri v1 --"wdt:P629"--> a1 a1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c4 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P275"--> v1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> a3 a3 --"wdt:P279"--> c5 end union0r <== or ==> union0l end subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P178"--> v3 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P126"--> v3 end union1r <== or ==> union1l end v2 --"wdt:P31"--> v4 v3 --"wdt:P31"--> c9 subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P17"--> v5 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P27"--> v5 end union2r <== or ==> union2l end v5 --"wdt:P41"--> v6 v5 --"wdt:P30"--> v7 v7 --"wdt:P242"--> v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c16 --"wikibase:language"--> c18 end