Workers Analytics Engine, Workers - Workers Analytics Engine SQL now supports filtering using HAVING and LIKE
5mo ago
Source
CloudflareWorkers Analytics Engine, Workers - Workers Analytics Engine SQL now supports filtering using HAVING and LIKEcloudflare.comYou 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 matching NOT LIKE - case-sensitive pattern exclusion ILIKE - case-insensitive pattern matching NOT 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.
You might also wanna read
Lakeflow Connect row filtering is now generally available
Microsoft·3d ago
Version 18.2
Microsoft·1mo ago
Common SQL Anti-Patterns That Impact Performance and Maintainability
This article discusses common SQL anti-patterns that negatively impact query performance and maintainability in enterprise software environm
Using Named-Entity Recognition to Filter Sensitive Information in Free Text for External APIs
The article discusses methods for filtering sensitive information in free text before sending it to external APIs, particularly for chatbots
Technical Discussion: Distributed SQL Engine Requirements for Ultra-Wide Tables in ML and Multi-Omics Data
A technical discussion about the limitations of current SQL databases and data processing systems when handling ultra-wide tables with thous
Brewery: A Developer Tool for Saving and Organizing Code Snippets and Regular Expressions
Brewery is a developer tool designed to help programmers save, organize, and share code snippets, with a particular focus on regular express

Comments
Sign in to join the conversation.
No comments yet. Be the first.