sql query to sum close to given amount mysql code example Example: sum mysql column SELECT sum( mark ) FROM `student`