博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
查询某时间段订单各金额总和
阅读量:6960 次
发布时间:2019-06-27

本文共 907 字,大约阅读时间需要 3 分钟。

hot3.png

订单总金额

select sum((goods_amount - discount + tax + shipping_fee + insure_fee + pay_fee + pack_fee + card_fee)) AS total_fee from ecs_order_info where pay_status=2 and shipping_status in(1,2,4) and shipping_time>1469952000 and shipping_time<1472630400

红包

select sum(bonus) from ecs_order_info where pay_status=2 and shipping_status in(1,2,4) and shipping_time>1469952000 and shipping_time<1472630400

配送费

select sum(shipping_fee) from ecs_order_info where pay_status=2 and shipping_status in(1,2,4) and shipping_time>1469952000 and shipping_time<1472630400

余额

select sum(surplus) from ecs_order_info where pay_status=2 and shipping_status in(1,2,4) and shipping_time>1469952000 and shipping_time<1472630400

订单数

select count(order_id) from ecs_order_info where pay_status=2 and shipping_status in(1,2,4) and shipping_time>1469952000 and shipping_time<1472630400

转载于:https://my.oschina.net/xuyaoxiang/blog/754872

你可能感兴趣的文章
说说自己对nofollow标签的一些看法
查看>>
通过URL参数请求不同的后端服务器
查看>>
MySQL 可以用localhost 连接,但不能用IP连接的问题
查看>>
linux学习(之二)-初识linux的一些常用命令
查看>>
linux基础系统管理---系统管理
查看>>
重启网络出现RTNETLINK answers: File exists问题解决
查看>>
C++学习笔记——类
查看>>
Linux命令之chkconfig
查看>>
JVMTI开发教程之一个简单的Agent
查看>>
Git学习笔记
查看>>
Developer Express 之 XtraReport报表预览控件PrintControl设置
查看>>
java中switch使用的数据类型
查看>>
linux修复丢失的分区表
查看>>
【python】操作oracle数据库
查看>>
Symantec BE2012 0xe000fec9 报错
查看>>
iOS 开发遇到的问题
查看>>
单臂路由的实现
查看>>
国内安全管理平台应用发展对比分析
查看>>
tomcat启动startup.bat一闪而过
查看>>
STL源码剖析之算法:power
查看>>