当我尝试在mysql workbench中运行带有子查询的select语句时,我遇到了一个OK响应但没有结果(查询成功)。我确定代码正确,mysql也没有找到任何错误,但我不知道为什么没有得到任何答案。
以下是代码:
以下是代码:
SELECT date(created_at),
(SELECT
SUM(amount) AS topup_amount
FROM
wallet_transaction
WHERE
type = 'topup'
GROUP BY DATE(created_at)),
(SELECT
SUM(amount) AS admin_add_amount
FROM
wallet_transaction
WHERE
type = 'admin_add'
GROUP BY DATE(created_at))
FROM
wallet_transaction;