沃斯尼达耶
模型里 定义 关联关系了么
- 沃斯尼达耶 2019-05-14 已签到连续签到2天,获得了10个金钱
- 沃斯尼达耶 发表了说说8.30*5.30*5 欧耶
- 沃斯尼达耶 2019-05-13 已签到连续签到1天,获得了5个金钱
- 沃斯尼达耶 发表了说说我是大帅A
- 沃斯尼达耶 赞了回答
$subQuery = (new \yii\db\Query())->from('yn_goods_analyze_shop_by_day') ->select([ 'saleroom_sum' => 'sum(gross_margin)', ]) ->where(['between', 'create_date', $startTime, $endTime]) ->createCommand() ->getRawSql(); $query = (new \yii\db\Query())->from('yn_goods_analyze_shop_by_day') ->select([ 'saleroom' => 'sum(saleroom)', 'brand', 'goods_name', 'gross_margin' => 'sum(gross_margin)', 'gross_percent' => "sum(gross_margin) / ($subQuery) * 100", ]) ->where(['between', 'create_date', $startTime, $endTime]) ->groupBy('spid'); echo $query->createCommand()->getRawSql();
- 沃斯尼达耶 2019-05-10 已签到连续签到1天,获得了5个金钱
- 沃斯尼达耶 发表了说说我听见海浪的声音 站在城市的最中央 我想起眼泪的决心 你说愿意的那天起 后来怎么消失去 再也没有任何音讯 我是怎么能让你死心离去
- 沃斯尼达耶 2019-05-08 已签到连续签到1天,获得了5个金钱