我第一次使用Perl,我需要使用DateTime类来解析时间戳,比较时间戳等。但是,我发现它不包含在Perl中(我使用草莓5.26.1.1)和需要单独下载和安装。花了一些时间谷歌搜索后,我仍然不知道在哪里下载和如何安装。我尝试了以下但它不起作用。我已经设置了http_proxy,http_proxy_user和http_proxy_pass变量。
SELECT
t1.month,
COALESCE(t2.amount, 0) AS amount
FROM
(
SELECT 1 AS month UNION ALL
SELECT 2 UNION ALL
SELECT 3 UNION ALL
SELECT 4 UNION ALL
SELECT 5 UNION ALL
SELECT 6 UNION ALL
SELECT 7 UNION ALL
SELECT 8 UNION ALL
SELECT 9 UNION ALL
SELECT 10 UNION ALL
SELECT 11 UNION ALL
SELECT 12
) t1
LEFT JOIN
(
SELECT MONTH(created_on) AS month, SUM(amount) AS amount
FROM yourTable
GROUP BY MONTH(created_on)
) t2
ON t1.month = t2.month
ORDER BY
t1.month;
感谢。