Deviopath › PostgreSQL

Revenue from Paid Orders

Easy · Aggregation

SUM(column) adds up the values of a column. Combine it with WHERE to add up only some rows.

Return one row with one column, revenue: the sum of total for orders whose status is 'paid'.

Next: Average Salary