在psql上四舍五入时如何解决此错误

时间:2018-10-09 13:49:47

标签: sql postgresql

我试图理解为什么在psql上使用ROUND函数时出现错误。我的查询看起来像这样

round(avg(minutes_at_pickup_loading_incl_drops) / 60.0,2) as avg_hrs_loading,
round(avg(proper_minutes_at_delivery_loading) / 60.0,2) as avg_hrs_unloading

我收到此错误:

No function matches the given name and argument types. You might need to add explicit type casts.

我也尝试过这种方法:

round(avg(minutes_at_pickup_loading_incl_drops)*1.0 / 60.0,2) as avg_hrs_loading,
round(avg(proper_minutes_at_delivery_loading)*1.0 / 60.0,2) as avg_hrs_unloading 

但我仍然遇到相同的错误。请帮助我了解此错误的原因。谢谢

0 个答案:

没有答案