SELECT customer.customer_id, first_name, last_name, SUM(amount)
FROM customer
INNER JOIN payment
ON customer.customer_id = payment.customer_id
GROUP BY customer.customer_id
ORDER BY customer.customer_id;
Этот запрос дает правильный ответ, но когда я пишу
SELECT payment.customer_id, first_name, last_name, SUM(amount)
FROM customer
INNER JOIN payment
ON customer.customer_id = payment.customer_id
GROUP BY payment.customer_id
ORDER BY customer.customer_id;
Он показывает ошибки.