---
title: "ClickHouse Newsletter March 2022: There’s a window function for that!"
description: "ClickHouse 22.2 makes projections production-ready and on by default."
url: "https://swe.quest/articles/clickhouse-newsletter-march-2022-there-s-a-window-function-for-that-3afa5197d3d99ad4"
canonical: "https://clickhouse.com/blog/clickhouse-newsletter-march-2022-theres-a-window-function-for-that"
source: "ClickHouse"
published: "2022-03-07"
difficulty: "medium"
kind: "Release"
reading_minutes: 5
tags: ["analytics","sql","databases"]
---

# ClickHouse Newsletter March 2022: There’s a window function for that!

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2022-03-07, 5 min read, Release. Original: [https://clickhouse.com/blog/clickhouse-newsletter-march-2022-theres-a-window-function-for-that](https://clickhouse.com/blog/clickhouse-newsletter-march-2022-theres-a-window-function-for-that)

## Summary

ClickHouse 22.2 makes projections production-ready and on by default. Projections store re-sorted or pre-aggregated copies of table data that queries are automatically routed to when less data must be read. The release also adds insert\_deduplication\_token for custom block-level deduplication toward exactly-once inserts, a default\_table\_engine setting, ephemeral columns, experimental NLP text-classification functions, and implicit casting in dictGet. The window-function section shows three queries on the UK Price Paid dataset: comparing a row against its partition average, finding a property's previous sale with lagInFrame, and sorting by window-function results.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)

## Prerequisites

- SQL window functions ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- ClickHouse basics ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))

## Keywords

ClickHouse, ClickHouse 22.2, projections, insert\_deduplication\_token, lagInFrame, window functions, Chproxy

## Related posts

- [ClickHouse 22.2 Released](https://swe.quest/articles/clickhouse-22-2-released-cb382bb271f76cf3.md): ClickHouse · 2022-02-24 · Medium · 5 min read · Analytics & OLAP, Databases, Replication
  ClickHouse 22.2 makes projections production-ready: alternate sort orders and aggregations stored in the same data parts, updated atomically with the main table and chosen automatically by the query optimizer, unlike materialized views.
- [ClickHouse Release 26.1](https://swe.quest/articles/clickhouse-release-26-1-95ef64a0953c6443.md): ClickHouse · 2026-02-11 · Medium · 14 min read · Analytics & OLAP, Databases, Observability, Storage engines
  ClickHouse 26.1 ships 25 new features, 43 performance optimizations and 176 bug fixes.
- [ClickHouse Newsletter March 2023: Contributing to ClickHouse](https://swe.quest/articles/clickhouse-newsletter-march-2023-contributing-to-clickhouse-86808ac436001235.md): ClickHouse · 2023-03-23 · Medium · 6 min read · SQL, Analytics & OLAP
  ClickHouse v23.2 ships 18 new features, 30 performance optimisations and 43 bug fixes, headlined by multi-stage PREWHERE, read support for Apache Iceberg v1 tables, and correlation matrix computation.
- [ClickHouse projections now behave like true secondary indexes](https://swe.quest/articles/clickhouse-projections-now-behave-like-true-secondary-indexes-0baa9f93cd285ce3.md): ClickHouse · 2026-01-13 · Medium · 6 min read · Analytics & OLAP, Query engines, Storage engines, Performance engineering
  ClickHouse lightweight projections, which store only a sorting key plus a \_part\_offset pointer into the base table, now act as true secondary indexes with granule-level pruning instead of only pruning whole parts.
- [ClickHouse Release 25.6](https://swe.quest/articles/clickhouse-release-25-6-783d976caa8e5340.md): ClickHouse · 2025-07-02 · Medium · 12 min read · Analytics & OLAP, Query engines, Storage engines, Consistency models
  ClickHouse 25.6 (25 features, 32 performance optimizations, 105 bug fixes) can take a single consistent storage snapshot across all subqueries and CTEs in a SELECT, controlled by enable\_shared\_storage\_snapshot\_in\_query.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
