Home / Companies / Tinybird / Blog / Post Details
Content Deep Dive

ClickHouse ® tips #5: Adding and subtracting intervals

Blog post from Tinybird

Post Details
Company
Date Published
Author
Alberto Romeu
Word Count
155
Company Posts That Month
51
Language
English
Hacker News Points
-
Post removed?
No
Summary

ClickHouse® supports adding and subtracting time and date intervals using a syntax similar to that of other databases like Postgres, which includes the INTERVAL keyword. This feature allows users to manipulate dates with various intervals such as seconds, minutes, hours, days, weeks, months, quarters, and years without the need for parentheses, providing flexibility in constructing queries. Users can combine multiple intervals in a single query, and while the smallest supported interval is a second, there are workarounds to achieve finer precision. Furthermore, the functions now(), interval, and other interval types are case-insensitive, allowing for versatile use in both uppercase and lowercase formats.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.