Looks like to me based on the stuff calcite has, you may create a calendar table first:
tbl_calendar id min max 1 0 15 2 16 30 3 31 45 4 46 60 select * from main, tbl_calendar where main.timestamp >= tbl_calendar.min and main.timestamp < tbl_calendar.max group by tbl_calendar.id > On Apr 27, 2015, at 5:19 AM, Li Yang <[email protected]> wrote: > > Hi > > Given a timestamp column, I want to group by every 15 minutes like [1]. > How can this be best done with calcite? > > Looked at the reference, but answer is not obvious. > > > Thanks > Yang > > > [1] > http://stackoverflow.com/questions/2793994/group-mysql-query-by-15-min-intervals > [2] https://github.com/apache/incubator-calcite/blob/master/doc/REFERENCE.md
