web2py's DAL has no support for subselects, so unfortunately there's no 
current "DAL-way" to translate that query.

BTW: your query doesn't make sense to me (I'm a professional dba in "real 
life"). You're just counting how many distinct values of "ip" are in the 
table.... why bother with a subselect when you can do a count distinct ? 
That is supported by DAL (check the book)

On Thursday, February 20, 2014 3:31:18 PM UTC+1, Fcosqui wrote:
>
> Hi !
>
> I want to translate this query to Web2py format, but i have found nothing 
> in Documentation
>
> SELECT COUNT(ip) from (SELECT ip FROM info GROUP BY ip) as b;
>
> i don't want to use "executesql"
>
> someone can help me? 
>
> thnx
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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