Cloudflare changelogs | Workers Analytics EngineCloudflare changelogs for Workers Analytics Enginehttps://developers.cloudflare.com/changelog/Workers Analytics Engine, Workers - Workers Analytics Engine adds supports for new SQL functionshttps://developers.cloudflare.com/changelog/2025-09-26-analytics-engine-sql-enhancements/https://developers.cloudflare.com/changelog/2025-09-26-analytics-engine-sql-enhancements/<p>You can now perform more powerful queries directly in <a href="https://developers.cloudflare.com/analytics/analytics-engine/" target="_blank">Workers Analytics Engine</a> with a major expansion of our SQL function library.</p> <p>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.</p> <p>Today, we've expanded Workers Analytics Engine's SQL capabilities with several new functions:</p> <p><a href="https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/aggregate-functions/" target="_blank"><strong>New aggregate functions:</strong></a></p> <ul> <li><code>argMin()</code> - Returns the value associated with the minimum in a group</li> <li><code>argMax()</code> - Returns the value associated with the maximum in a group</li> <li><code>topK()</code> - Returns an array of the most frequent values in a group</li> <li><code>topKWeighted()</code> - Returns an array of the most frequent values in a group using weights</li> <li><code>first_value()</code> - Returns the first value in an ordered set of values within a partition</li> <li><code>last_value()</code> - Returns the last value in an ordered set of values within a partition</li> </ul> <p><a href="https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/bit-functions/" target="_blank"><strong>New bit functions:</strong></a></p> <ul> <li><code>bitAnd()</code> - Returns the bitwise AND of two expressions</li> <li><code>bitCount()</code> - Returns the number of bits set to one in the binary representation of a number</li> <li><code>bitHammingDistance()</code> - Returns the number of bits that differ between two numbers</li> <li><code>bitNot()</code> - Returns a number with all bits flipped</li> <li><code>bitOr()</code> - Returns the inclusive bitwise OR of two expressions</li> <li><code>bitRotateLeft()</code> - Rotates all bits in a number left by specified positions</li> <li><code>bitRotateRight()</code> - Rotates all bits in a number right by specified positions</li> <li><code>bitShiftLeft()</code> - Shifts all bits in a number left by specified positions</li> <li><code>bitShiftRight()</code> - Shifts all bits in a number right by specified positions</li> <li><code>bitTest()</code> - Returns the value of a specific bit in a number</li> <li><code>bitXor()</code> - Returns the bitwise exclusive-or of two expressions</li> </ul> <p><a href="https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/mathematical-functions/" target="_blank"><strong>New mathematical functions:</strong></a></p> <ul> <li><code>abs()</code> - Returns the absolute value of a number</li> <li><code>log()</code> - Computes the natural logarithm of a number</li> <li><code>round()</code> - Rounds a number to a specified number of decimal places</li> <li><code>ceil()</code> - Rounds a number up to the nearest integer</li> <li><code>floor()</code> - Rounds a number down to the nearest integer</li> <li><code>pow()</code> - Returns a number raised to the power of another number</li> </ul> <p><a href="https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/string-functions/" target="_blank"><strong>New string functions:</strong></a></p> <ul> <li><code>lowerUTF8()</code> - Converts a string to lowercase using UTF-8 encoding</li> <li><code>upperUTF8()</code> - Converts a string to uppercase using UTF-8 encoding</li> </ul> <p><a href="https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/encoding-functions/" target="_blank"><strong>New encoding functions:</strong></a></p> <ul> <li><code>hex()</code> - Converts a number to its hexadecimal representation</li> <li><code>bin()</code> - Converts a string to its binary representation</li> </ul> <p><a href="https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/type-conversion-functions/" target="_blank"><strong>New type conversion functions:</strong></a></p> <ul> <li><code>toUInt8()</code> - Converts any numeric expression, or expression resulting in a string representation of a decimal, into an unsigned 8 bit integer</li> </ul> <h4>Ready to get started?</h4> <p>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. <a href="https://developers.cloudflare.com/analytics/analytics-engine/get-started/">Get started </a> with Workers Analytics Engine and explore all available functions in our <a href="https://developers.cloudflare.com/analytics/analytics-engine/sql-reference/">SQL reference documentation</a>.</p>Thu, 02 Oct 2025 00:00:00 GMTWorkers Analytics EngineWorkers Analytics EngineWorkers