Questions tagged «sequel»

8
如何在PostgreSQL中将平均值四舍五入到小数点后两位?
我正在通过Ruby gem'sequel'使用PostgreSQL。 我试图将其舍入到小数点后两位。 这是我的代码: SELECT ROUND(AVG(some_column),2) FROM table 我收到以下错误: PG::Error: ERROR: function round(double precision, integer) does not exist (Sequel::DatabaseError) 运行以下代码时没有错误: SELECT ROUND(AVG(some_column)) FROM table 有人知道我在做什么错吗?
191 sql  ruby  postgresql  sequel 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.