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.
Asked: 2021-06-25 11:00:00 +0000
Seen: 14 times
Last updated: Oct 23 '22