query-bdd81d21403bf8a094d65ed991db68bb

rq turtle/ttl

BouzinacJura1Wikidata:SPARQL query service/Wikidata Query Help/Result Views

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX p: <http://www.wikidata.org/prop/>
#defaultView:LineChart
SELECT DISTINCT ?month ?patronage ?year 
WHERE
{
  wd:Q204853 p:P3872 ?statement.
  ?statement ps:P3872 ?patronage.
  ?statement pqv:P585 ?timevalue.
  ?timevalue wikibase:timeValue ?time.
  ?timevalue wikibase:timePrecision 10 . # Precsion month (10)
  BIND (STR(MONTH(?time)) AS ?month)
  BIND (STR(YEAR(?time)) AS ?year)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?month"):::projected v2("?patronage"):::projected v1("?statement") v4("?time") v3("?timevalue") v6("?year"):::projected c1(["wd:Q204853"]):::iri c7(["10^^xsd:integer"]):::literal c1 --"p:P3872"--> v1 v1 --"p:statement/P3872"--> v2 v1 --"p:qualifier/value/P585"--> v3 v3 --"wikibase:timeValue"--> v4 v3 --"wikibase:timePrecision"--> c7 bind0[/"str(month-from-dateTime(?time))"/] v4 --o bind0 bind0 --as--o v5 bind1[/"str(year-from-dateTime(?time))"/] v4 --o bind1 bind1 --as--o v6