Home > Software engineering >  bigquery creating timestamp buckets with 15 minutes interval
bigquery creating timestamp buckets with 15 minutes interval

Time:07-20

I want to achieve this:

Output

12:00:00 - 12:15:00
12:15:00 - 12:30:00
12:30:00 - 12:45:00
12:45:00 - 1:00:00 .......,
count(orders)
from table

I have a timestamp in the data table available (2022-07-05 19:45:00 UTC), I want to achieve #orders with every 15 minutes interval for a day.

CodePudding user response:

Currently BigQuery supports the following granularity for time-unit or ingestion time partitioning: daily, hourly, monthly, or yearly. Docs: enter image description here

  • Related