query-898866c79ceb6ce362da215170585f3d

rq turtle/ttl

dateCreated instead of dateModified?I was trying to adapt this query to make a histogram of when items were created rather than when they were last modified, but I can't seem to find the right schema. Do we have this info? If not, why not?

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 bd: <http://www.bigdata.com/rdf#>
#defaultView:BarChart
SELECT (SAMPLE(?date) AS ?date) (count(?item) AS ?count) (SAMPLE(?item) AS ?exampleitem) WHERE {
  ?item wdt:P17 wd:Q408 ; schema:dateModified ?date .
  BIND (xsd:integer(( NOW() - ?date )) AS ?daysago)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } .
}
GROUP BY ?daysago
ORDER BY DESC(?daysago)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count") v4("?date"):::projected v4("?daysago") v5("?exampleitem") v2("?item"):::projected c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q408"]):::iri v2 --"wdt:P17"--> c2 v2 --"schema:dateModified"--> v4 bind0[/"http://www.w3.org/2001/XMLSchema#integer(NOW() - ?date)"/] v4 --o bind0 bind0 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end bind4[/"sample(?date)"/] v4 --o bind4 bind4 --as--o v4 bind5[/"count(?item)"/] v2 --o bind5 bind5 --as--o v4 bind6[/"sample(?item)"/] v2 --o bind6 bind6 --as--o v5