query-31819afeba3352541b9d85543e7b46ad
create Literature-Snippets from @ddhefte WD items with WP sitelink
SELECT ?subject ?subjectLabel ?heft ?heftLabel ?item ?itemLabel ?pl ?sitelink ?snippet
WHERE
{
?heft wdt:P1433 wd:Q14916674.
?item wdt:P1433 ?heft.
?heft wdt:P1476 ?hefttitle.
?heft wdt:P433 ?issue.
?heft wdt:P98 ?editor.
?heft wdt:P212 ?isbn13.
?heft wdt:P577 ?published.
?editor rdfs:label ?el filter (lang(?el) = "de").
?item wdt:P304 ?pages.
?item wdt:P50 ?author.
?author rdfs:label ?al filter (lang(?al) = "de").
?item wdt:P1476 ?title.
?item wdt:P921 ?subject.
optional {
?item wdt:P5008 ?project.
?project rdfs:label ?pl filter (lang(?pl) = "de").
}
?subject wdt:P31 wd:Q5.
?sitelink schema:about ?subject .
?sitelink schema:isPartOf https://de.wikipedia.org/.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
BIND(CONCAT("'"UNIQ--ref-0000000E-QINU
"'") as ?snippet)
}
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#create Literature-Snippets from @ddhefte WD items with WP sitelink
SELECT ?subject ?subjectLabel ?heft ?heftLabel ?item ?itemLabel ?pl ?sitelink ?snippet
WHERE
{
?heft wdt:P1433 wd:Q14916674.
?item wdt:P1433 ?heft.
?heft wdt:P1476 ?hefttitle.
?heft wdt:P433 ?issue.
?heft wdt:P98 ?editor.
?heft wdt:P212 ?isbn13.
?heft wdt:P577 ?published.
?editor rdfs:label ?el filter (lang(?el) = "de").
?item wdt:P304 ?pages.
?item wdt:P50 ?author.
?author rdfs:label ?al filter (lang(?al) = "de").
?item wdt:P1476 ?title.
?item wdt:P921 ?subject.
optional {
?item wdt:P5008 ?project.
?project rdfs:label ?pl filter (lang(?pl) = "de").
}
?subject wdt:P31 wd:Q5.
?sitelink schema:about ?subject .
?sitelink schema:isPartOf <https://de.wikipedia.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
BIND(CONCAT("'"`UNIQ--ref-0000000E-QINU`"'") as ?snippet)
}