Saya rasa Anda tidak memerlukan Subquery di sini:
SELECT p.customerNumber, MAX(p.amount) AS max
FROM payments p
GROUP BY p.customerNumber
ORDER BY max DESC
LIMIT 1
Saya rasa Anda tidak memerlukan Subquery di sini:
SELECT p.customerNumber, MAX(p.amount) AS max
FROM payments p
GROUP BY p.customerNumber
ORDER BY max DESC
LIMIT 1