Reputation: 77
How do you round 0.2356 to 0.23 in Google BigQuery?
Upvotes: 1
Views: 17476
Reputation: 208022
Remember that ROUND
returns float
, hence it has two parameters and in the 2nd parameter you are able to define the decimals you want returned. Others CEIL
, FLOOR
return integer
, hence no second parameter, but you can mimic the decimals by using math.
select floor(0.2356*100)/100
Google BigQuery Documentation -> Functions and Operators -> Mathematical Function -> ROUND
Upvotes: 3