Advertisements
Advertisements
प्रश्न
Find sum of Sale Price of the cars purchased by the customer having ID C0001 from table SALE.
कोड लेखन
Advertisements
उत्तर
SELECT SUM(SalePrice) AS Total_Sale_Price
FROM SALE
WHERE CustId = 'C0001';
- SUM(SalePrice): Adds up all the values in the Sale Price column.
- WHERE CustomerID = 'C0001': Filters the table so it only calculates the sum for the customer with ID C0001.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
