query-6cee57146ca85991911e3324e189bcf8

rq turtle/ttl

Synia: venue

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX target: <http://www.wikidata.org/entity/Q15817015>

SELECT DISTINCT
  ?description
  ?value ?valueUrl

  ?wikidata ?wikidataUrl

  ?scholia ?scholiaUrl
WHERE {
  BIND(target: AS ?work)
  {
    BIND(1 AS ?order)
    BIND("Title" AS ?description)
    ?work wdt:P1476 ?value .

    BIND(CONCAT(SUBSTR(STR(target:), 32), "&nbsp;↗") AS ?wikidata)
    BIND(CONCAT("https://www.wikidata.org/wiki/", SUBSTR(STR(target:), 32)) AS ?wikidataUrl)

    BIND("Scholia&nbsp;↗" AS ?scholia)
    BIND(CONCAT("https://scholia.toolforge.org/venue/", SUBSTR(STR(target:), 32)) AS ?scholiaUrl)

  }
  UNION
  {
    BIND(2.5 AS ?order)
    BIND("Language" AS ?description)
    ?work wdt:P407 ?iri .
    BIND(SUBSTR(STR(?iri), 32) AS ?q) 
    ?iri rdfs:label ?value_string .
    FILTER (LANG(?value_string) = 'en')
    BIND(STR(?value_string) AS ?value)
    BIND(CONCAT("#language/", ?q) AS ?valueUrl)
  }
  UNION
  {
    SELECT
      (8 AS ?order)
      ("Topics" AS ?description)
      (GROUP_CONCAT(?value_; separator=", ") AS ?value)
      # (CONCAT("#topics/", GROUP_CONCAT(?q; separator=",")) AS ?valueUrl)
    {
      BIND(1 AS ?dummy)
      target: wdt:P921 ?iri .
      BIND(SUBSTR(STR(?iri), 32) AS ?q) 
      ?iri rdfs:label ?value_string . 
      FILTER (LANG(?value_string) = 'en')
      BIND(COALESCE(?value_string, ?q) AS ?value_)
    }
    GROUP BY ?dummy
  }
  UNION
  {
    BIND(11 AS ?order)
    BIND("Homepage" AS ?description)
    ?work wdt:P856 ?valueUrl .
    BIND(STR(?valueUrl) AS ?value)
  }
} 
ORDER BY ?order

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v15("?description"):::projected v13("?dummy") v10("?iri") v15("?order") v14("?q") v7("?scholia"):::projected v8("?scholiaUrl"):::projected v15("?value"):::projected v12("?valueUrl"):::projected v14("?value_") v9("?value_string") v5("?wikidata"):::projected v6("?wikidataUrl"):::projected v2("?work") c5([http://www.wikidata.org/entity/Q15817015]):::iri bind0[/"http://www.wikidata.org/entity/Q15817015"/] bind0 --as--o v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; bind1[/"'11^^xsd:integer'"/] bind1 --as--o v15 bind2[/"'Homepage'"/] bind2 --as--o v15 v2 --"wdt:P856"--> v12 bind3[/"str(?valueUrl)"/] v12 --o bind3 bind3 --as--o v15 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; f4[["?value_string = 'en'"]] f4 --> v9 bind5[/"'1^^xsd:integer'"/] bind5 --as--o v13 c5 --"wdt:P921"--> v10 bind6[/"substring(str(?iri),'32^^xsd:integer')"/] v10 --o bind6 bind6 --as--o v14 v10 --"rdfs:label"--> v9 bind7[/"?value_string?q"/] v9 --o bind7 v14 --o bind7 bind7 --as--o v14 bind9[/"'8^^xsd:integer'"/] bind9 --as--o v15 bind10[/"'Topics'"/] bind10 --as--o v15 bind11[/"?value_"/] v14 --o bind11 bind11 --as--o v15 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; f12[["?value_string = 'en'"]] f12 --> v9 bind13[/"'2.5^^xsd:decimal'"/] bind13 --as--o v15 bind14[/"'Language'"/] bind14 --as--o v15 v2 --"wdt:P407"--> v10 bind15[/"substring(str(?iri),'32^^xsd:integer')"/] v10 --o bind15 bind15 --as--o v14 v10 --"rdfs:label"--> v9 bind16[/"str(?value_string)"/] v9 --o bind16 bind16 --as--o v15 bind17[/"concat('#language/',?q)"/] v14 --o bind17 bind17 --as--o v12 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; bind18[/"'1^^xsd:integer'"/] bind18 --as--o v15 bind19[/"'Title'"/] bind19 --as--o v15 v2 --"wdt:P1476"--> v15 bind20[/"concat(substring(str(http://www.wikidata.org/entity/Q15817015),'32^^xsd:integer'),'&nbsp;↗')"/] bind20 --as--o v5 bind21[/"concat('https://www.wikidata.org/wiki/',substring(str(http://www.wikidata.org/entity/Q15817015),'32^^xsd:integer'))"/] bind21 --as--o v6 bind22[/"'Scholia&nbsp;↗'"/] bind22 --as--o v7 bind23[/"concat('https://scholia.toolforge.org/venue/',substring(str(http://www.wikidata.org/entity/Q15817015),'32^^xsd:integer'))"/] bind23 --as--o v8 end union0r <== or ==> union0l end