Closed andyw8 closed 8 years ago
to_char is the generally recommended solution, as it's reliable in all situations: http://stackoverflow.com/questions/13113096/how-to-round-an-average-to-2-decimal-places-in-postgresql . Thanks a lot for taking a look and raising the issue!
I'm curious why the solution uses:
trim(to_char(sum(bks.slots)/2.0, '9999999999999999D99'))
rather than the simpler:
round(sum(bks.slots) / 2.0, 2)
Am I missing some downside?