query-40746614bf152b30c3c32327ef95b126

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?project ?projectLabel ?compatibleWith ?compatibleWithLabel ?inception (GROUP_CONCAT(?use) as ?uses) (GROUP_CONCAT(?useLabel; SEPARATOR = '\n') as ?useLabels)
WHERE 
{
  ?project wdt:P31/wdt:P279* wd:Q188860.

  # Note that we intentionally don't have an ambiguous "Wikidata library" entity
  # and instead accurately model the use cases of libraries via P8956 and P366.
  ?project wdt:P8956 ?compatibleWith.
  {?compatibleWith wdt:P1269 wd:Q16354758}
  UNION {?compatibleWith wdt:P1269 wd:Q2013}

  OPTIONAL {?project wdt:P571 ?inception}
  OPTIONAL {?project wdt:P366 ?use}

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
    ?project rdfs:label ?projectLabel.
    ?use rdfs:label ?useLabel.
    ?compatibleWith rdfs:label ?compatibleWithLabel.
  }
} GROUP BY ?project ?projectLabel ?compatibleWith ?compatibleWithLabel ?inception ORDER BY ?projectLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?compatibleWith"):::projected v7("?compatibleWithLabel"):::projected v4("?inception"):::projected v2("?project"):::projected v1("?projectLabel"):::projected v5("?use"):::projected v6("?useLabel"):::projected v9("?useLabels") v8("?uses") a1((" ")) c6(["wd:Q16354758"]):::iri c3(["wd:Q188860"]):::iri c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c7(["wd:Q2013"]):::iri v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v2 --"wdt:P8956"--> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P1269"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P1269"--> c6 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P571".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P366".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 v2 --"rdfs:label"--> v1 v5 --"rdfs:label"--> v6 v3 --"rdfs:label"--> v7 end bind2[/"?use"/] v5 --o bind2 bind2 --as--o v8 bind3[/"?useLabel"/] v6 --o bind3 bind3 --as--o v9