MySQL--指定浮点型数据的精确度TRUNCATE
时间:2021-07-01 10:21:17
帮助过:18人阅读
INTO perf_week(node_id,perf_time,pm25,pm10,
temp,humi)
SELECT node_id,
‘2016-12-08 11:55:00‘ AS perf_time,
TRUNCATE(
AVG(pm25),
2)
AS pm25,
TRUNCATE(
AVG(pm10),
2)
AS pm10,
TRUNCATE(AVG(curr_temp),2) AS temp,
TRUNCATE(
AVG(curr_humidity),
2)
AS humi
FROM perf_pm25
WHERE perf_time
BETWEEN DATE_SUB(
‘2016-12-08 11:55:00‘,INTERVAL
1 WEEK)
AND ‘2016-12-08 11:55:00‘
GROUP BY node_id;
啦啦啦
MySQL--指定浮点型数据的精确度TRUNCATE
标签:span interval tween _id style pm2 class node back