query-a00a857ee6dc3065978528304cbe89a8
SQL
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?sql
WHERE
{
?item wdt:P31 wd:Q16324495.
?item wdt:P1433 wd:Q14916674.
?item wdt:P433 ?issue.
?item wdt:P577 ?pubdate.
BIND(concat("update ddhe set pubdate='",str(YEAR(?pubdate)),'-',str(MONTH(?pubdate)),'-',str(DAY(?pubdate)),"' where id=",str(?issue),';') as ?sql )
SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?issue")
v1("?item")
v3("?pubdate")
v4("?sql"):::projected
c10(["de"]):::literal
c2(["wd:Q16324495"]):::iri
c8(["bd:serviceParam"]):::iri
c4(["wd:Q14916674"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P1433"--> c4
v1 --"wdt:P433"--> v2
v1 --"wdt:P577"--> v3
bind0[/"concat('update ddhe set pubdate='',str(year-from-dateTime(?pubdate)),'-',str(month-from-dateTime(?pubdate)),'-',str(day-from-dateTime(?pubdate)),'' where id=',str(?issue),';')"/]
v3 --o bind0
v2 --o bind0
bind0 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end