Files
upstream-mirror 0f4df23290
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
snapshot of https://github.com/sqlc-dev/sqlc.git (main, 2026-09-16; blobs > 131072B omitted)
2026-09-16 02:17:34 +05:00

49 lines
1.0 KiB
SQL

-- name: Abs :one
SELECT abs(-17.4);
-- name: Cbrt :one
SELECT cbrt(27.0);
-- name: Ceil :one
SELECT ceil(-42.8);
-- name: Ceiling :one
SELECT ceiling(-95.3);
-- name: Degrees :one
SELECT degrees(0.5);
-- name: Div :one
SELECT div(9,4);
-- name: Exp :one
SELECT exp(1.0);
-- name: Floor :one
SELECT floor(-42.8);
-- name: Ln :one
SELECT ln(2.0);
-- name: Log :one
SELECT log(100.0);
-- name: Logs :one
SELECT log(2.0, 64.0);
-- name: Mod :one
SELECT mod(9,4);
-- name: Pi :one
SELECT pi();
-- name: Power :one
SELECT power(9.0, 3.0);
-- name: Radians :one
SELECT radians(45.0);
-- name: Round :one
SELECT round(42.4);
-- name: Rounds :one
SELECT round(42.4382, 2);
-- name: Scale :one
SELECT scale(8.41);
-- name: Sign :one
SELECT sign(-8.4);
-- name: Sqrt :one
SELECT sqrt(2.0);
-- name: Trunc :one
SELECT trunc(42.8);
-- name: Truncs :one
SELECT trunc(42.4382, 2);
-- name: WidthBucketNumerics :one
SELECT width_bucket(5.35, 0.024, 10.06, 5);
-- name: WidthBucketTimestamps :one
SELECT width_bucket(now(), array['yesterday', 'today', 'tomorrow']::timestamptz[]);