Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Assuming you have a table named "cars" with columns "car_id" and "price", you can use the following query to calculate the total price for a specific car ID:

SELECT SUM(price) as totalprice FROM cars WHERE carid = [insert car ID here];

If you want to calculate the total price for all car IDs, you can use the following query:

SELECT carid, SUM(price) as totalprice FROM cars GROUP BY car_id;

This will provide a list of car IDs and their corresponding total prices.