're right !

i didn't know this sentence "count distinct"   ( im not a professional dba 
:P)

thnx!

El jueves, 20 de febrero de 2014 17:57:27 UTC-3, Niphlod escribió:
>
> 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to