Workers Analytics Engine SQL adds HAVING and LIKE operators
Workers Analytics Engine now supports HAVING clause for filtering aggregated groups and LIKE/ILIKE pattern matching operators for flexible string searching. These additions enable more powerful SQL queries on high-cardinality data.
You can now use the HAVING clause and LIKE pattern matching operators in Workers Analytics Engine ↗.
Workers Analytics Engine allows you to ingest and store high-cardinality data at scale and query your data through a simple SQL API.
Filtering using HAVING
The HAVING clause complements the WHERE clause by enabling you to filter groups based on aggregate values. While WHERE filters rows before aggregation, HAVING filters groups after aggregation is complete.
You can use HAVING to filter groups where the average exceeds a threshold:
SELECT
blob1 AS probe_name,
avg(double1) AS average_temp
FROM temperature_readings
GROUP BY probe_name
HAVING average_temp > 10
You can also filter groups based on aggregates such as the number of items in the group:
SELECT
blob1 AS probe_name,
count() AS num_readings
FROM temperature_readings
GROUP BY probe_name
HAVING num_readings > 100
Pattern matching using LIKE
The new pattern matching operators enable you to search for strings that match specific patterns using wildcard characters:
LIKE- case-sensitive pattern matchingNOT LIKE- case-sensitive pattern exclusionILIKE- case-insensitive pattern matchingNOT ILIKE- case-insensitive pattern exclusion
Pattern matching supports two wildcard characters: % (matches zero or more characters) and _ (matches exactly one character).
You can match strings starting with a prefix:
SELECT *
FROM logs
WHERE blob1 LIKE 'error%'
You can also match file extensions (case-insensitive):
SELECT *
FROM requests
WHERE blob2 ILIKE '%.jpg'
Another example is excluding strings containing specific text:
SELECT *
FROM events
WHERE blob3 NOT ILIKE '%debug%'
Ready to get started?
Learn more about the HAVING clause or pattern matching operators in the Workers Analytics Engine SQL reference documentation.
Source: original entry ↗
More from Cloudflare
Follow Cloudflare to get its new changes in your feed and email digest.
Cloudflare One Client for macOS 2026.8.2100.0
GA release for macOS Cloudflare One Client with improved split tunnel handling that no longer briefly blocks traffic during reconnects, support for non-RFC 1918 local IPv4 networks, faster connects with lower memory use, and numerous reliability fixes across DNS, reauthentication, and client stability.
Cloudflare One Client for Windows 2026.8.2100.0
This GA release improves split tunnel reliability, adds support for non-RFC 1918 local networks, optimizes connection performance with faster reconnections and lower memory usage, and includes numerous bug fixes for DNS, registration, and network handling. The client now features a service recovery mechanism that automatically restarts on system unlock and better handles large hosts files without blocking traffic.
Cloudflare One Client for Linux 2026.8.2100.0
New GA release for Linux with improved split tunnel handling that no longer briefly blocks traffic during reconnects, support for non-RFC 1918 local IPv4 networks, faster tunnel reconnections, and lower memory usage. Includes numerous stability and reliability fixes for DNS, reconnection behavior, and crash issues.