# UDF to query/visualize data over time

**URL:** <https://discuss.aerospike.com/t/udf-to-query-visualize-data-over-time/7445>\
**Category:** User Defined Functions (UDF)\
**Created:** [May 18, 2020, 2:32am UTC](https://discuss.aerospike.com/t/udf-to-query-visualize-data-over-time/7445 "2020-05-18T02:32:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rod\_McCutcheon](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rod_mccutcheon/32/1397_2.png) [@Rod\_McCutcheon](https://discuss.aerospike.com/u/Rod_McCutcheon)\
**Post date:** [May 18, 2020, 2:32am UTC](https://discuss.aerospike.com/t/udf-to-query-visualize-data-over-time/7445/1 "2020-05-18T02:32:43Z")

</div>

We are using Aerospike as a timeseries database (with time started and time end bins). I’m trying to understand how much data we have stored over time, so that I can see what the effect would be of applying a TTL. Can anyone help me with a UDF that aggregates the number of records by namespace/set over time (perhaps by month)?
