Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's an example from the documentation that just reads like a "rough translation of SQL into Python":

    select((item.order, item.order.total_price,
         sum(item.price * item.quantity))
         for item in OrderItem
         if item.order.total_price < sum(item.price * item.quantity))


Well, it doesn't seems that "rough" to me, because content of GROUP BY and HAVING sections is determined automatically and there is no need to manually join tables




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: