query-41958aa3c4932c10cfa0fbaa7ca99ff2

rq turtle/ttl

поряд описи на двох мовах

використано wikibase:propertyType skos:altLabel schema:description

SELECT ?p ?pLabel ?d ?d2 ?aliases WHERE { { SELECT ?p ?pt ?d ?d2 (GROUP_CONCAT(DISTINCT ?alias; separator="|") as ?aliases) WHERE { ?p wikibase:propertyType ?pt . OPTIONAL {?p skos:altLabel ?alias FILTER (LANG (?alias) = "uk")} OPTIONAL {?p schema:description ?d FILTER (LANG (?d) = "uk") .} OPTIONAL {?p schema:description ?d2 FILTER (LANG (?d2) = "ru") .} } GROUP BY ?p ?pt ?d ?d2 } SERVICE wikibase:label { bd:serviceParam wikibase:language "uk,ru". } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# поряд описи на двох мовах
# використано  wikibase:propertyType  skos:altLabel  schema:description
SELECT ?p ?pLabel ?d ?d2 ?aliases WHERE {
  {
    SELECT ?p ?pt ?d ?d2 (GROUP_CONCAT(DISTINCT ?alias; separator="|") as ?aliases) WHERE {
      ?p wikibase:propertyType ?pt .
      OPTIONAL {?p skos:altLabel ?alias FILTER (LANG (?alias) = "uk")}
      OPTIONAL {?p schema:description ?d FILTER (LANG (?d) = "uk") .}
      OPTIONAL {?p schema:description ?d2 FILTER (LANG (?d2) = "ru") .}
    } GROUP BY ?p ?pt ?d ?d2
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "uk,ru". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?alias") v6("?aliases"):::projected v2("?d"):::projected v1("?d2"):::projected v4("?p"):::projected v5("?pt") c7(["bd:serviceParam"]):::iri c9(["uk,ru"]):::literal v4 --"wikibase:propertyType"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."skos:altLabel".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."schema:description".-> v2 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."schema:description".-> v1 end bind1[/"?alias"/] v3 --o bind1 bind1 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end