---
title: More SQL aggregate, date and time functions available in Workers
  Analytics Engine · Changelog
description: Workers Analytics Engine now supports more SQL functions for
  aggregation and for working with dates and times
chatbotDeprioritize: true
source_url:
  html: https://developers.cloudflare.com/changelog/2025-11-12-analytics-engine-further-sql-enhancements/
  md: https://developers.cloudflare.com/changelog/2025-11-12-analytics-engine-further-sql-enhancements/index.md
---

# Changelog

New updates and improvements at Cloudflare.

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

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_ZEA2nF.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/).
