🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
#### 求和 ~~~ $sumAmount = Be::getTable('oms_order') ->where('create_time', '>', '2017-12-01') ->sum('amount'); ~~~ 等效SQL: ~~~ SELECT SUM(amount) FROM oms_order WHERE create_time > '2017-12-01' ~~~ #### 表达式求和 ~~~ $sumAmount = Be::getTable('oms_order') ->where('create_time', '>', '2017-12-01') ->sum('amount * currency_rate'); ~~~ 等效SQL: ~~~ SELECT SUM(amount * currency_rate) FROM oms_order WHERE create_time > '2017-12-01' ~~~