query-51ba1f835ab1aa33cad73d9cc11a3694

rq turtle/ttl

Synia: author - topic

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target1: <http://www.wikidata.org/entity/Q20984804>
PREFIX target2: <http://www.wikidata.org/entity/Q2539>

SELECT
  ?description ?descriptionLabel

  ?value ?valueLabel ?valueUrl ?valueDescription

  ?wikidata ?wikidataUrl

  ?scholia ?scholiaUrl
WHERE {
  {
    BIND(1 AS ?order)
    BIND(wd:Q482980 AS ?description)
    BIND(target1: AS ?value)
    BIND(CONCAT("#author/", SUBSTR(STR(target1:), 32)) AS ?valueUrl)
    BIND("Scholia&nbsp;↗" AS ?scholia)
    BIND(CONCAT("https://scholia.toolforge.org/author/", SUBSTR(STR(?value), 32)) AS ?scholiaUrl)
  }
  UNION
  {
    BIND(2 AS ?order)
    BIND(wd:Q26256810 AS ?description)
    BIND(target2: AS ?value)
    BIND(CONCAT("#topic/", SUBSTR(STR(target2:), 32)) AS ?valueUrl)
    BIND("Scholia&nbsp;↗" AS ?scholia)
    BIND(CONCAT("https://scholia.toolforge.org/topic/", SUBSTR(STR(?value), 32)) AS ?scholiaUrl)
  }
  BIND("Wikidata&nbsp;↗" AS ?wikidata)
  BIND(CONCAT("https://www.wikidata.org/wiki/", SUBSTR(STR(?value), 32)) AS ?wikidataUrl)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
ORDER BY ?order

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?description"):::projected v7("?order") v7("?scholia"):::projected v7("?scholiaUrl"):::projected v7("?value"):::projected v7("?valueUrl"):::projected v7("?wikidata"):::projected v8("?wikidataUrl"):::projected c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; bind0[/"'2^^xsd:integer'"/] bind0 --as--o v7 bind1[/"'wd:Q26256810'"/] bind1 --as--o v7 bind2[/"'wd:Q2539'"/] bind2 --as--o v7 bind3[/"concat('#topic/',substring(str('wd:Q2539'),'32^^xsd:integer'))"/] bind3 --as--o v7 bind4[/"'Scholia&nbsp;↗'"/] bind4 --as--o v7 bind5[/"concat('https://scholia.toolforge.org/topic/',substring(str(?value),'32^^xsd:integer'))"/] v7 --o bind5 bind5 --as--o v7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; bind6[/"'1^^xsd:integer'"/] bind6 --as--o v7 bind7[/"'wd:Q482980'"/] bind7 --as--o v7 bind8[/"'wd:Q20984804'"/] bind8 --as--o v7 bind9[/"concat('#author/',substring(str('wd:Q20984804'),'32^^xsd:integer'))"/] bind9 --as--o v7 bind10[/"'Scholia&nbsp;↗'"/] bind10 --as--o v7 bind11[/"concat('https://scholia.toolforge.org/author/',substring(str(?value),'32^^xsd:integer'))"/] v7 --o bind11 bind11 --as--o v7 end union0r <== or ==> union0l end bind12[/"'Wikidata&nbsp;↗'"/] bind12 --as--o v7 bind13[/"concat('https://www.wikidata.org/wiki/',substring(str(?value),'32^^xsd:integer'))"/] v7 --o bind13 bind13 --as--o v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end