mysql计算
阅读原文时间:2023年07月09日阅读:1

select @csum := 0;
select create_time,merchant_id,award as 奖励,total_count as 数量,(@csum := @csum + award*total_count) as 累计 FROM aty_award_task where merchant_id =55 and status = 1;

select @csum := 0;
select award_task_id, create_time,merchant_id,award as 奖励,total_count as 数量,task_money 任务金,(@csum := @csum + task_money*total_count) as 累计 FROM aty_award_task where merchant_id =55;

select @csum := 0;
select create_time,merchant_id,award as 奖励,(@csum := @csum + award/0.7) as 累计支付 FROM aty_award_task_receive where merchant_id =55 and status =2 and pay_status = 1;

select @csum := 0;
select create_time,merchant_id,award as 奖励,(@csum := @csum + award) as 累计支付 FROM aty_award_task_receive where merchant_id =55 and status =2 and pay_status = 1

select sum(money) as todayMoney from odr_order_base where pay_status = 1 and status in(1,2,3)

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章