Google 查询语言中的舍入

pro*_*ype 5 scalar gql

我想在 Google 查询语言中实现一系列带有舍入的查询,例如:

select round(age,-1), count(id) group by round(age,-1)
Run Code Online (Sandbox Code Playgroud)

或int/floor/等的任意组合。

select int(age/10)*10, count(id) group by int(age/10)*10
Run Code Online (Sandbox Code Playgroud)

有什么办法可以做到这一点吗?我怀疑不会,因为 GQL 中的标量函数列表非常有限,但确实想知道是否有解决方法。

http://code.google.com/apis/chart/interactive/docs/querylanguage.html#scalar_functions

SRK*_*SRK 3

不,我认为我们不能在 GQL 中进行舍入...

您显示的链接不适用于谷歌应用程序引擎...