gpt4 book ai didi

gql - Google 查询语言中的舍入

转载 作者:行者123 更新时间:2023-12-04 06:11:40 24 4
gpt4 key购买 nike

我想用 Google 查询语言实现一系列四舍五入的查询,例如:

select round(age,-1), count(id) group by round(age,-1)

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

select int(age/10)*10, count(id) group by int(age/10)*10

有什么办法吗?我怀疑没有,因为 GQL 中的标量函数列表非常有限,但确实想知道是否有解决方法。

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

最佳答案

在查询的末尾添加格式,例如:

"select age format age '0'"

参见 Google Query Language Reference - Format .

关于gql - Google 查询语言中的舍入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7707759/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com