query-8c148e904fbbd23d8d826c0c84136c44
A method for slicing up all items into non-intersecting subsets would be to use their dateModified value which are indexed. This query uses items last modified in the first half of 2019: 10:00, 24 September 2021 (UTC) JuraI just run the query in several steps and it yield some 10000 rows for "en" without any duplicates. --- Yeah, I'm aware of that, but for the above application it doesn't matter that much: depending on the tool, duplicate statements wont get created or KrBot would eventually eliminate an occasional one. Still, for a full answer, one should probably have noted it. 09:50, 24 September 2021 (UTC)) talk (Dipsacus fullonum --."ORDER BY to select different subsets of the query solutions will not be useful unless the order is made predictable by using OFFSET and LIMIT"Using : SPARQL 1.1 definition clause. To quote directly from the OFFSET clause. So the subquery isn't required to give the different results for different values of the ORDER BY: Just a warning: the results from a SPARQL query is per definition unordered unless there is a Jura1@Excellent idea. Seems highly efficient. One can even compute the intervals (see query). Depending on field, one might even be more interested in one date range rather than the others.
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT ?month (COUNT(*) as ?count)
{
?item wdt:P31 wd:Q101352 ; schema:dateModified ?modified .
BIND(substr(str(?modified),1,7) as ?month)
}
GROUP BY ?month