TO_QUARTER(Lakehouse v1)
指定した日付またはタイムスタンプから四半期(1、2、3、4)を取得します。
Analyze 構文
Section titled “Analyze 構文”func.to_quarter(<expr>)Analyze の例
Section titled “Analyze の例”func.now(), func.to_quarter(func.now()), func.quarter(func.now())
┌─────────────────────────────────────────────────────────────────────────────────────┐│ func.now() │ func.to_quarter(func.now()) │ func.quarter(func.now()) │├────────────────────────────┼─────────────────────────────┼──────────────────────────┤│ 2024-03-14 23:32:52.743133 │ 3 │ 3 │└─────────────────────────────────────────────────────────────────────────────────────┘SQL 構文
Section titled “SQL 構文”TO_QUARTER( <date_or_time_expr> )整数。
SQL の例
Section titled “SQL の例”SELECT NOW(), TO_QUARTER(NOW()), QUARTER(NOW());
┌─────────────────────────────────────────────────────────────────┐│ now() │ to_quarter(now()) │ quarter(now()) │├────────────────────────────┼───────────────────┼────────────────┤│ 2024-03-14 23:32:52.743133 │ 1 │ 1 │└─────────────────────────────────────────────────────────────────┘