How to calculate the sum of numbers in a column in Yii2?

With the help of which team can calculate the sum of numbers from a column of the database in Yii2?
June 14th 19 at 20:20
1 answer
June 14th 19 at 20:22
SomeModel::find()->sum('col_name');

Find more questions by tags MySQLPHPYii