New SQL features in ClickHouse 25.11

Mark Needham

In the latest ClickHouse 25.11 release, several useful SQL features are introduced, making everyday queries more straightforward to write.

We're talking about functions that help you find values associated with min/max results, work with fractional limits, analyze cumulative distributions, and handle some everyday data manipulation tasks. Nothing groundbreaking, but definitely valuable additions to your SQL toolkit.

In this walkthrough, we cover practical examples of each new feature so you can see exactly how they work and when you might want to use them.

  • argMax and argMin functions – Get the associated value when finding max/min (like finding which town had the highest property price)
  • argAndMax and argAndMin – Return both the max/min value and its associated value in one go
  • Fractional LIMIT and OFFSET – Use percentages instead of row counts (like LIMIT 0.1 for top 10%)
  • CUME_DIST window function – Calculate the cumulative distribution ratio, showing what percentage of rows are at or below the current value
  • flipCoordinates function – Swap lat/long coordinates when working with different geo function conventions
  • arrayRemove function – Clean up arrays by removing specific values
  • midpoint function – Find the value closest to the average of your arguments

Release blog post - https://clickhouse.com/blog/clickhouse-release-25-11#argandmin-and-argandmax

Follow us
X imageBluesky imageSlack image
GitHub imageTelegram imageMeetup image
Rss image