I have Price column in my SQLite table (OrderTable). I want to add all the values in Price column, so that I can have the total price.
For example Price column has 3 values :
150.00
250.00
300.00
How can I get the total amount (700.00) using SQLite query?
total(X) where x is the column name. Click here to know more about math function in sqlite.
SELECT total(Price) AS TOTAL_PRICE FROM OrderTable; // will result float value
SELECT sum(Price) AS TOTAL_PRICE FROM OrderTable // will result int value
SAMPLE
From the reference