query-a7f5801a9f6a3fec548c8921076e0f26
Synia: Podcast
Use at
- https://query.wikidata.org/sparql
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/Q17085703>
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), " ↗") AS ?wikidata)
BIND(CONCAT("https://www.wikidata.org/wiki/", SUBSTR(STR(target:), 32)) AS ?wikidataUrl)
BIND("Scholia ↗" AS ?scholia)
BIND(CONCAT("https://scholia.toolforge.org/podcast/", SUBSTR(STR(target:), 32)) AS ?scholiaUrl)
}
UNION
{
SELECT
(2 AS ?order)
("Hosts" AS ?description)
(GROUP_CONCAT(?value_; separator=", ") AS ?value)
# (CONCAT("#authors/", GROUP_CONCAT(?q; separator=",")) AS ?valueUrl)
{
BIND(1 AS ?dummy)
target: wdt:P371 ?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(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
v15("?dummy")
v11("?iri")
v15("?order")
v15("?q")
v7("?scholia"):::projected
v8("?scholiaUrl"):::projected
v15("?value"):::projected
v14("?valueUrl"):::projected
v15("?value_")
v9("?value_string")
v5("?wikidata"):::projected
v6("?wikidataUrl"):::projected
v2("?work")
c3([http://www.wikidata.org/entity/Q17085703]):::iri
bind0[/"http://www.wikidata.org/entity/Q17085703"/]
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;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
bind1[/"'11^^xsd:integer'"/]
bind1 --as--o v15
bind2[/"'Homepage'"/]
bind2 --as--o v15
v2 --"wdt:P856"--> v14
bind3[/"str(?valueUrl)"/]
v14 --o bind3
bind3 --as--o v15
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
f4[["?value_string = 'en'"]]
f4 --> v9
bind5[/"'1^^xsd:integer'"/]
bind5 --as--o v15
c3 --"wdt:P921"--> v11
bind6[/"substring(str(?iri),'32^^xsd:integer')"/]
v11 --o bind6
bind6 --as--o v15
v11 --"rdfs:label"--> v9
bind7[/"?value_string?q"/]
v9 --o bind7
v15 --o bind7
bind7 --as--o v15
bind9[/"'8^^xsd:integer'"/]
bind9 --as--o v15
bind10[/"'Topics'"/]
bind10 --as--o v15
bind11[/"?value_"/]
v15 --o bind11
bind11 --as--o v15
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r 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"--> v11
bind15[/"substring(str(?iri),'32^^xsd:integer')"/]
v11 --o bind15
bind15 --as--o v15
v11 --"rdfs:label"--> v9
bind16[/"str(?value_string)"/]
v9 --o bind16
bind16 --as--o v15
bind17[/"concat('#language/',?q)"/]
v15 --o bind17
bind17 --as--o v14
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
f18[["?value_string = 'en'"]]
f18 --> v9
bind19[/"'1^^xsd:integer'"/]
bind19 --as--o v15
c3 --"wdt:P371"--> v11
bind20[/"substring(str(?iri),'32^^xsd:integer')"/]
v11 --o bind20
bind20 --as--o v15
v11 --"rdfs:label"--> v9
bind21[/"?value_string?q"/]
v9 --o bind21
v15 --o bind21
bind21 --as--o v15
bind23[/"'2^^xsd:integer'"/]
bind23 --as--o v15
bind24[/"'Hosts'"/]
bind24 --as--o v15
bind25[/"?value_"/]
v15 --o bind25
bind25 --as--o v15
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
bind26[/"'1^^xsd:integer'"/]
bind26 --as--o v15
bind27[/"'Title'"/]
bind27 --as--o v15
v2 --"wdt:P1476"--> v15
bind28[/"concat(substring(str(http://www.wikidata.org/entity/Q17085703),'32^^xsd:integer'),' ↗')"/]
bind28 --as--o v5
bind29[/"concat('https://www.wikidata.org/wiki/',substring(str(http://www.wikidata.org/entity/Q17085703),'32^^xsd:integer'))"/]
bind29 --as--o v6
bind30[/"'Scholia ↗'"/]
bind30 --as--o v7
bind31[/"concat('https://scholia.toolforge.org/podcast/',substring(str(http://www.wikidata.org/entity/Q17085703),'32^^xsd:integer'))"/]
bind31 --as--o v8
end
union0r <== or ==> union0l
end