gpt4 book ai didi

mysql - 如何计算年份及其值(value)?

转载 作者:行者123 更新时间:2023-11-30 23:07:08 25 4
gpt4 key购买 nike

<分区>

我已经得到了这个查询的一些结果,但我想更改如下所示的结果而不是它

要显示的结果::

    2011                     2012
26267.620000000003 404603.20999999996
144384.36 173245.96000000002
199704.47999999998 208524.42

查询

SELECT
YEAR (PAYMENTDATE) AS YEARNUMBER,
MONTH (PAYMENTDATE) AS MONNUMBER,
SUM (AMOUNT) AS MONTOTAL
FROM
PAYMENTS
GROUP BY
YEAR (PAYMENTDATE)

Result::上面的查询

2011        26267.620000000003  
2011 144384.36
2012 173245.96000000002
2012 208524.42

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com