欢迎投稿

今日深度:

sqlite3 取整函数,sqlite3取整

sqlite3 取整函数,sqlite3取整


向下取整 floor (地板)

math.floor(-2.2)
# -3.0
math.floor(2.2)
# 2.0

向上取整 ceil (天花板)

math.ceil(-2.2)
# -2.0
math.ceil(2.2)
# 3.0

舍入 round

round(2.24, 1)
# 2.2
round(2.26, 1)
# 2.3

select  substr(riqi,1,7),count(*),ceil((sum(zongjia*10000)/sum(mianji))) from  bj_fang  where riqi like '2017%' or riqi like '2016%' group by substr(riqi,1,7)


www.htsjk.Com true http://www.htsjk.com/SQLite/32558.html NewsArticle sqlite3 取整函数,sqlite3取整 向下取整 floor (地板) math. floor (- 2.2 ) # -3.0 math. floor ( 2.2 ) # 2.0 向上取整 ceil (天花板) math. ceil (- 2.2 ) # -2.0 math. ceil ( 2.2 ) # 3.0 舍入 round round (2.24, 1) # 2.2 roun...
相关文章
    暂无相关文章
评论暂时关闭