Databases (and search engines like Elasticsearch) typically store the date of birth instead of the current age. It's a simple date value instead of a calculated one which must be maintained every day. But statistics often should contain the age - which is much more pleasant for humans than the date (or year) of birth. This post shows an easy way to use the Elasticsearch date_histogram aggregation to output age buckets instead of counting users by their year of birth.
Suchergebnisse mit Tag „statistics“
Statistics are important for many projects, but not all of them are easy to build. Many long-term stats involve heavy SQL queries and some may of these queries may also freeze database servers or tables. Caching intermediate results may limit these queries to a minimum.