CEIL
FLOOR
ROUND
切り捨てた整数を返します。
FLOOR(x)
下記の値を入力するとサンプルに即時反映されます。
customer_id
total_spend
points
customers
-- 적립 포인트 내림 계산 SELECT customer_id, FLOOR(total_spend * 0.01) AS points FROM customers;