Hi there,

I have a model like this,

class Rating(db.Model):
    ...
    total_rating = db.IntegerProperty(required=True, default=0)
    num_of_rating = db.IntegerProperty(required=True, default=0)

I'd like to return the top 10 average rating entities, like in SQL:
    ORDER BY total_rating/num_of_rating DESC           -- suppose
num_of_rating > 0

Any ideas on how to archive this on GAE/GQL?

Thanks,

Will

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to