--按年分组查看
select to_char(to_timestamp(start_time_of_date::bigint), 'YYYY') as d , count(cdr_id) as total_call,sum (call_duration::integer /60 +1) as total_duration from cdr
where to_timestamp(start_time_of_date::bigint) between '2010-01-01' and '2010-12-12' group by d
--按月分组查看
select to_char(to_timestamp(start_time_of_date::bigint), 'YYYY-MM') as d , count(cdr_id) as total_call,sum (call_duration::integer /60 +1) as total_duration from cdr
where to_timestamp(start_time_of_date::bigint) between '2010-01-01' and '2010-12-12' group by d
--按天分组查看
select to_char(to_timestamp(start_time_of_date::bigint), 'YYYY-MM-DD') as d , count(cdr_id) as total_call,sum (call_duration::integer /60 +1) as total_duration from cdr
where to_timestamp(start_time_of_date::bigint) between '2010-01-01' and '2010-12-12' group by
--按小时分组查看
select to_char(to_timestamp(start_time_of_date::bigint), 'YYYY-MM-DD HH24 ' ) as d , count(cdr_id) as total_call,sum (call_duration::integer /60 +1) as total_duration from cdr
where to_timestamp(start_time_of_date::bigint) between '2010-01-01' and '2010-12-12' group by d order by d
--按秒分组查看
select to_char(to_timestamp(start_time_of_date::bigint), 'YYYY-MM-DD HH24:MI:SS ' ) as d , count(cdr_id) as total_call,sum (call_duration::integer /60 +1) as total_duration from cdr
where to_timestamp(start_time_of_date::bigint) between '2010-01-01' and '2010-12-12' group by d
分享到:
相关推荐
国外大牛写的一个mysql数据库转换postgresql的脚本。亲试可以无错误运行。
网上传的postgreSQL汉字转拼音的方法,是针对9.3的版本(相信你要是8.4的也搜到了但不能直接用,才来看我的),尝试了8.4的版本来做拼音处理。发现网上的《postgreSQL汉字转拼音》里面坑比较多,尝试纠正了一下,发...
postgresql 实现c language外部函数调用,为了提高数据库信息安全及数据库性能,通过c language实现相关功能,并编译成动态链接库so方式,供数据库postgresql调用,在数据库端只见函数的实现接口,隐藏实现细节
postgresql数据类型转换.pdf
pgCenter 可能是最好的 PostgreSQL 统计数据查看工具。 PostgreSQL 提供各种统计数据,包括表,所以呢,函数和其他数据对象信息和使用方法。甚至还有更详细的统计数据,比如连接,当前查询和数据库操作 (INSERT/...
详细描述了DB2与GreenPlum/PostgreSQL在各方面的差异,主要用于DB2数据库向GreenPlum/PostgreSQL数据库的迁移。
一句SQL搞定 区间或分数段数统计,不需要做视图
支持2万+汉字转拼音
ruoyi框架集成postgresql,对自增表设置序列
postgresql
aida 运用postgresql进行数据统计
二、更新规划器统计: 二、更新规划器统计: 二、更新规划器统计: 二、更新规划器统计: 二、更新规划器统计: .57 四、定期重建索引: 四、定期重建索引: 四、定期重建索引: 四、定期重建索引: . 59 PostgreSQL...
mysql2postgresql, 转换mysql模式到 PostgreSQL mysql2postgresql转换mysql模式和数据到 PostgreSQL用法使用命令在xml格式中创建转储: mysqldump --xml -u USER_NAME DB_NAME> DUMP_FILE_NAME
支持2万+汉字转拼音首字母
数据库转换工具 MySQL转换到postgresql
PostgreSQL(postgresql-13.5.tar.bz2) PostgreSQL是一种特性非常齐全的自由软件的对象-关系型数据库管理系统(ORDBMS),是以加州大学计算机系开发的POSTGRES,4.2版本为基础的对象关系型数据库管理系统。...
SpringBoot配置Mybaits连接PostgreSql三层架构实现增改删。结构代码规范齐全,上传的是整个工作空间。
用JDBC连接OpenGauss Postgresql 实现增删改查功能的图书管理系统