query-695657e139dc13132eb642d2896d6388
Showing the year part only in a timeline
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#>
# AGSA artworks/ paintings/drawing/print/sculpture by year of inceptin
#defaultView:Timeline
SELECT DISTINCT ?date ?year (COUNT(?artwork) AS ?count) WHERE {
{?artwork wdt:P31 wd:Q3305213.} # painting
UNION
{?artwork wdt:P31 wd:Q11060274.} # print
UNION
{?artwork wdt:P31 wd:Q93184.} # drawing
UNION
{?artwork wdt:P31 wd:Q860861.} # sculpture
UNION
{?artwork wdt:P31 wd:Q42314818.} # visual art
?artwork wdt:P195 wd:Q705557. # Art work is in AGSA
?artwork wdt:P571 ?date
BIND(str(YEAR(?date)) AS ?year)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?date ?year
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?artwork"):::projected
v4("?count")
v2("?date"):::projected
v3("?year"):::projected
c4(["wd:Q93184"]):::iri
c13(["en"]):::literal
c8(["wd:Q705557"]):::iri
c3(["wd:Q11060274"]):::iri
c2(["wd:Q3305213"]):::iri
c11(["bd:serviceParam"]):::iri
c6(["wd:Q42314818"]):::iri
c5(["wd:Q860861"]):::iri
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;
v1 --"wdt:P31"--> c6
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c5
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c4
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c2
end
union0r <== or ==> union0l
end
v1 --"wdt:P195"--> c8
v1 --"wdt:P571"--> v2
bind0[/"str(year-from-dateTime(?date))"/]
v2 --o bind0
bind0 --as--o v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind2[/"count(?artwork)"/]
v1 --o bind2
bind2 --as--o v4