BigQuery select data within a time interval

前端 未结 2 488
余生分开走
余生分开走 2021-01-24 21:34

my data looks like

name| From | To_City | Date of request

Andy| Paris | London| 08/21/2014 12:00

Lena | Koln | Berlin | 08/22/2014 18:00

<
2条回答
  •  [愿得一人]
    2021-01-24 22:12

    You could truncate the date to exclude the hours, minutes and seconds. Then group by that column

    SELECT SUBSTR(STRING(date-of-request), 0, 9) AS day
    FROM t1
    GROUP BY day
    

提交回复
热议问题