try with SELECT row_number(ORDER BY records DESC) as id, a.* FROM ( SELECT sabinet.jt AS journal, count(*) AS records FROM sabinet.sabinet GROUP BY sabinet.jt ) a
-- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.