On Tue, Mar 21, 2006 at 21:16:03 +0800, William ZHANG <[EMAIL PROTECTED]> wrote: > > "Sigurdur Gunnlaugsson" <[EMAIL PROTECTED]> > > On Mon, 2006-03-20 at 21:10, Wei Wei wrote: > > > > Try: > > > > order by count(id)/age::float > > Or you can use the standard grammer: > > order by cast(count(id)/age as float)
Don't you have to cast before the divide? I think the above will convert the truncated result to float. However he could do something like: order by count(id)/cast(age as float) ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org