写SQL计算出季度
SELECT
'第一季度' AS 季度,单位,
sum( 发运量 ) AS 发运量
FROM
sheet1
WHERE
LEFT ( 发运时间, 7 ) BETWEEN "2022-01"
AND "2022-03"
GROUP BY
单位 UNION ALL
SELECT
'第二季度' AS 季度,单位,
sum( 发运量 ) AS 发运量
FROM
sheet1
WHERE
LEFT ( 发运时间, 7 ) BETWEEN "2022-04"
AND "2022-06"
GROUP BY
单位 UNION ALL
SELECT
'第三季度' AS 季度,单位,
sum( 发运量 ) AS 发运量
FROM
sheet1
WHERE
LEFT ( 发运时间, 7 ) BETWEEN "2022-07"
AND "2022-09"
GROUP BY
单位 UNION ALL
SELECT
'第四季度' AS 季度,单位,
sum( 发运量 ) AS 发运量
FROM
sheet1
WHERE
LEFT ( 发运时间, 7 ) BETWEEN "2022-10"
AND "2022-12"
GROUP BY
单位