SQL query to sum balances of rows with id > 5

Write a SQL query to sum the balances of all rows with an id greater than 5.

Problem

Given a table with two columns (id, balance), write a SQL query to add up the balances of all rows with an id that is greater than 5.
Example input: 
id | balance
1  | 100
2  | 200
3  | 300
4  | 400
5  | 500
6  | 600
7  | 700
Example output: 
2100

Solution

This solution is in SQL. Our A.I. can create solutions in multiple languages.
by sarastevens
SELECT SUM(balance) FROM table WHERE id > 5;

/*

The above solution is optimal because it uses the SUM function to add up the balances of all rows with an id that is greater than 5.

*/

A.I. Evaluation of the Solution

The candidate's solution is correct and demonstrates a level of completeness. The candidate has correctly used the SUM function to add up the balances of all rows with an id that is greater than 5.

Evaluated at: 2022-11-23 14:15:56