Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
GQL を使用して、GAE データストア内のテーブルの特定の列の最大値を見つけるにはどうすればよいですか?
GQL を使用して最大値を取得するには、次のようにします。
max_x = db.GqlQuery("SELECT * FROM MyModel ORDER BY x DESC").get().x
この構文的には短いが同等のアプローチを使用できます。
max_x = MyModel.all().order('-x').get().x