SUM - Sum Aggregate1 / 10
SUM is an aggregate function which calculates the sum of a column. To find the sum of all order totals in the table, try:
SELECT SUM(order_total) FROM orders;| order_id | customer | item | quantity | order_total |
|---|---|---|---|---|
| 1 | Alice | Laptop | 1 | 1200 |
| 2 | Bob | Mouse | 2 | 40 |
| 3 | Carlos | Monitor | 1 | 300 |
| 4 | Diana | Keyboard | 1 | 100 |
| 5 | Evan | Headphones | 1 | 150 |
Ctrl+Enter to submit
SUM - Sum Aggregate - Free SQL Practice Online
Practise SUM - Sum Aggregate with 10 free, interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup, no install, and no signup. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.