---
title: More SQL aggregate, date and time functions available in Workers Analytics Engine
description: Workers Analytics Engine now supports more SQL functions for aggregation and for working with dates and times
image: https://developers.cloudflare.com/changelog-preview.png
---

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://developers.cloudflare.com/changelog/rss/index.xml) [ View RSS feeds ](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://developers.cloudflare.com/changelog/) 

## More SQL aggregate, date and time functions available in Workers Analytics Engine

Nov 12, 2025 

[ Workers Analytics Engine ](https://developers.cloudflare.com/analytics/analytics-engine/)[ Workers ](https://developers.cloudflare.com/workers/) 

You can now perform more powerful queries directly in [Workers Analytics Engine ↗](https://developers.cloudflare.com/analytics/analytics-engine/) with a major expansion of our SQL function library.

Workers Analytics Engine allows you to ingest and store high-cardinality data at scale (such as custom analytics) and query your data through a simple SQL API.

Today, we've expanded Workers Analytics Engine's SQL capabilities with several new functions:

[**New aggregate functions:** ↗](https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/aggregate-functions/)

* `countIf()` \- count the number of rows which satisfy a provided condition
* `sumIf()` \- calculate a sum from rows which satisfy a provided condition
* `avgIf()` \- calculate an average from rows which satisfy a provided condition

[**New date and time functions:** ↗](https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/date-time-functions/)

* `toYear()`
* `toMonth()`
* `toDayOfMonth()`
* `toDayOfWeek()`
* `toHour()`
* `toMinute()`
* `toSecond()`
* `toStartOfYear()`
* `toStartOfMonth()`
* `toStartOfWeek()`
* `toStartOfDay()`
* `toStartOfHour()`
* `toStartOfFifteenMinutes()`
* `toStartOfTenMinutes()`
* `toStartOfFiveMinutes()`
* `toStartOfMinute()`
* `today()`
* `toYYYYMM()`

#### Ready to get started?

Whether you're building usage-based billing systems, customer analytics dashboards, or other custom analytics, these functions let you get the most out of your data. [Get started ](https://developers.cloudflare.com/analytics/analytics-engine/get-started/) with Workers Analytics Engine and explore all available functions in our [SQL reference documentation](https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/).