【发布时间】:2019-03-12 17:30:19
【问题描述】:
我将收入浮动值作为字符串。在执行一个简单的查询后:
SELECT
EXTRACT(date FROM time) date,
SUM(CAST(revenue AS FLOAT64)) number
FROM
`mytable`
GROUP BY date
ORDER BY date DESC
我知道了:
2019-03-11 3.2172407478999996E8
2019-03-10 2.3065347E7
等等。
问题是 - 如何将这些值转换为浮点数?我知道堆栈上已经发布了相同类型的问题,但没有一个能够让我找到正确的解决方案。
【问题讨论】:
标签: sql formatting google-bigquery string-formatting scientific-notation