well, I don't have a postgres installation at hand, but the gist of it 
should be clear .... if you can't come up with a solution I'll test it at 
home.

On Tuesday, April 9, 2013 3:26:03 PM UTC+2, Johann Spies wrote:
>
> That causes an error:
>
> ERROR:  syntax error at or near "ORDER"
> LINE 2:            SELECT row_number(ORDER BY records DESC) as id, a...
>                                      ^
> Regards
> Johann
>
>
> On 9 April 2013 15:11, Niphlod <[email protected] <javascript:>> wrote:
>
>> 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 [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Because experiencing your loyal love is better than life itself, 
> my lips will praise you.  (Psalm 63:3)
>  

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to