crate / crate

CrateDB is a distributed and scalable SQL database for storing and analyzing massive amounts of data in near real-time, even with complex queries. It is PostgreSQL-compatible, and based on Lucene.

Home Page:https://cratedb.com/product

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `quarter` to `INTERVAL` values

surister opened this issue · comments

commented

Problem Statement

We cannot do: SELECT INTERVAL '1 quarter' this is Ok in Postgres.

Possible Solutions

No response

Considered Alternatives

No response

commented

After further research the Tableau test seems flawed, I don't think 'an interval of a quarter' makes much sense, is it just 4 months? quarters are context dependant, e.g: 1 Jan is Quarter 1, that's why SELECT EXTRACT(QUARTER FROM '1 JAN 2022'::date) makes sense but interval doesn't.

For reference, SELECT INTERVAL '1' QUARTER in postgres just returns 1.0 secs.

Sorry for the noise.