发布网友 发布时间:2022-05-07 13:31
共2个回答
热心网友 时间:2022-05-07 15:00
sum 里面必须放入 列名追问sum(UNIX_TIMESTAMP(d_endtime)-UNIX_TIMESTAMP(d_begintime)) as aa
热心网友 时间:2022-05-07 16:18
SUM 是计算列的总和!追问sum(UNIX_TIMESTAMP(d_endtime)-UNIX_TIMESTAMP(d_begintime)) as aa追答你这样试试 SUM(SUM(UNIX_TIMESTAMP(d_endtime)) - SUM(UNIX_TIMESTAMP(d_begintime))) AS aa