Question: SELECT customer.name, SUM ( payment . payment _ amount ) FROM customer JOIN payment ON customer.customer _ id = payment.customer _ id GROUP BY customer.name

SELECT customer.name, SUM(payment.payment_amount) FROM customer
JOIN payment ON customer.customer_id = payment.customer_id
GROUP BY customer.name
WHERE payment.payment_amount >5000
Why would this query not work as expected?
The WHERE clause should come before the GROUP BY clause
The SUM function function won't work with the payment_amount column
The JOIN operation is performed incorrectly
The GROUP BY clause should come before the JOIN operation
The query is missing an ORDER BY clause

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!