v.19.14New Feature
WITH FILL Modifier for ORDER BY
WITH FILLmodifier forORDER BY. (continuation of #5069) #6610 (Anton Popov)
Why it matters
This feature addresses the need to fill gaps in ordered result sets directly within queries that include anORDER BY clause. It simplifies data analysis by automatically generating rows for missing values, ensuring continuous sequences without manual data preparation or complex workarounds.How to use it
Users can enable automatic filling of missing values by adding theWITH FILL modifier to their ORDER BY clause in a SELECT statement. For example:SELECT
date,
count()
FROM
events
ORDER BY
date WITH FILLThis fills in any missing dates in the ordered sequence with default values.