awk splits records into fields and runs actions for matching rows. Set the field separator for comma-delimited data; the default whitespace separator would leave each row in one field. Apply the status condition before adding the numeric amount. An END action prints the completed total once.
A row can contain a large amount and still be excluded by its status, so inspect which rows belong before checking the arithmetic. Field numbers start at one: $2 selects the status and $3 selects the amount. $0 means the whole record. The accumulator keeps its value between matching rows, while END runs after input finishes. Separating selection from addition helps you catch a common mistake: a correctly calculated total built from the wrong set of records.