oracle一条sql语句统计充值表中今天,昨天,前天三天充值记录
2024-08-20 03:15:05
select NVL(sum(case when create_date_time>=to_date('2014-11-24 00:00:00','yyyy-mm-dd hh24:mi:ss')
and create_date_time<=to_date('2014-11-24 23:59:59','yyyy-mm-dd hh24:mi:ss') then amount end),0) today
,NVL(sum(case when create_date_time>=to_date('2014-11-23 00:00:00','yyyy-mm-dd hh24:mi:ss')
and create_date_time<=to_date('2014-11-23 23:59:59','yyyy-mm-dd hh24:mi:ss') then amount end),0) yesterday
,NVL(sum(case when create_date_time>=to_date('2014-11-22 00:00:00','yyyy-mm-dd hh24:mi:ss')
and create_date_time<=to_date('2014-11-22 23:59:59','yyyy-mm-dd hh24:mi:ss') then amount end),0) TheDayBeforeYesterday
from t_pay;
假设今天是 2014-11-24
最新文章
- php查找字符串首次出现的位置 判断字符串是否在另一个字符串中
- 终端 git log 修改样式
- BootStrap入门教程 (一) :手脚架Scaffolding(全局样式(Global Style),格网系统(Grid System),流式格网(Fluid grid System),自定义(Customing),布局(Layouts))
- (转)Apple Push Notification Services in iOS 6 Tutorial: Part 1/2
- Bitmap的一些操作
- LKD: Chapter 6 Kernel Data Structures
- Windows实用快捷键
- androidkiller连接模拟器并修改源码调试
- Vue子页面给父页面传递数据
- C语言求行列式的值
- synchronized的简单用法
- 前端之JavaScript笔记1
- SharePoint 2013创建应用程序时IIS端口文件夹下没文件
- CI循环数组问题
- 20155337 《Java程序设计》实验一(Java开发环境的熟悉)实验报告
- “Hello World!”团队第五周第一次会议
- 51nod1515 明辨是非 并查集 + set
- Android_WebServices_源代码分析
- 简单获取各大视频网站的flash地址
- 2.1 摄像头V4L2驱动框架分析
热门文章
- 【Junit】JUnit-4.12使用报java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing错误
- <;a>;标签跳转传值。
- Hadoop 面试题 之Hive
- 淘宝(阿里百川)手机客户端开发日记第十三篇 mysql的连接
- 谷歌黑科技WaveNet,更先进的语音合成
- tableView 选中cell时,获取到当前cell
- 2016年10月30日--JavaScript语法
- 将kindeditor在线编辑器制作成smarty插件
- HEOI 2016 游记
- phpcms导航中添加内部链接