Question: You are working with a database table that contains invoice data. The table includes columns for customer_id and total (total amount billed for each invoice).

You are working with a database table that contains invoice data. The table includes columns for customer_id and total (total amount billed for each invoice). Some customers have multiple invoices. You want to find out the total amount billed to each customer, and store the result in a new column as total_amount.

Write SQL query. (Hint: add a GROUP BY clause that will group the data by customer ID number.)

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 Databases Questions!