コンテンツにスキップ

時刻を 30 分単位に丸めます。

func.time_slot(<expr>)
func.time_slot('2023-11-12 09:38:18.165575')
┌───────────────────────────────-───-───-──────┐
│ func.time_slot('2023-11-12 09:38:18.165575') │
│ Timestamp │
├─────────────────────────────────-───-────────┤
│ 2023-11-12 09:30:00 │
└─────────────────────────────────-───-────────┘
time_slot(<expr>)
引数 説明
<expr> タイムスタンプ

TIMESTAMP。「YYYY-MM-DD hh:mm:ss.ffffff」形式で返されます。

SELECT
time_slot('2023-11-12 09:38:18.165575')
┌─────────────────────────────────────────┐
│ time_slot('2023-11-12 09:38:18.165575') │
│ Timestamp │
├─────────────────────────────────────────┤
│ 2023-11-12 09:30:00 │
└─────────────────────────────────────────┘