oracle默认管理员账号密码是什么原因orale查询每年、每月、每日统计量的sql语句

每年select to_char(createtime, ‘YYYY’) 年, count(*) from table group by to_char(createtime, ‘YYYY’);每季度select to_char(createtime, ‘q’) 年, count(*) from table group by tooracle账号_char(createtime, ‘q’);每月select to_char(createtime, ‘YYYY’) 年, to_char(createtime, ‘mm’) 月, count(*) from table group by to_char(createtime, ‘YYYY’), to_char(createtime, ‘mm’);每日select to_char(createtime, ‘YYYY’) 年,to_char(createtime, ‘mm’) 月,to_char(createtime, ‘dd’) 日, count(*) from table group by to_char(createtime, ‘YYYY’), to_char(createtime, ‘mm’),to_char(createtime, ‘dd’);其中createtime为date类型,如果为varchar先要转换为date类型

此条目发表在oracle metalink账号分类目录,贴了, , 标签。将固定链接加入收藏夹。