Hi mcamel,

Please find below the working code:

from gluon.dal import Expression

tbl = db.abc_tbl
max_created_on = tbl.created_on.max()
query = Expression(db,"date_sub(now(), interval interval_time minute) >
created_on")
rows=db(query).select(tbl.device_id,tbl.sensor_id,tbl.interval_time,max_created_on,groupby=tbl.device_id|tbl.sensor_id)

Regards,
Amit

On Wed, Aug 22, 2012 at 11:44 AM, mcamel <[email protected]> wrote:

> Hi Amit,
>
> Could you post the final code that works?.
>
> Thanks.
>
> --
>
>
>
>

-- 



Reply via email to