Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, Stefan.
Asked: January 17, 2018 - 3:02 pm UTC
Last updated: January 17, 2018 - 3:50 pm UTC
Version: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
Viewed 1000+ times
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production PL/SQL Release 12.1.0.2.0 - Production CORE 12.1.0.2.0 Production TNS for Linux: Version 12.1.0.2.0 - Production NLSRTL Version 12.1.0.2.0 - Production
select trunc(SEC), SUM(SEC_COUNT) from ( select CREATED as SEC, COUNT(* ) as SEC_COUNT from ALL_OBJECTS group by CREATED ) group by trunc(SEC) order by 1 asc ; returns this result TRUNC(SECOND) SUM(SECOND_COUNT) 8-Feb-2012 9 8-Feb-2012 1 8-Feb-2012 55 8-Feb-2012 64 8-Feb-2012 58 ...
select trunc( sec ) dt, sum( sec_count ) from ( select created as sec, count(*) as sec_count from all_objects group by created ) group by trunc( sec ) order by 1; DT SUM(SEC_COUNT) 07-JUL-2014 00:00:00 70 07-JUL-2014 00:00:00 30 07-JUL-2014 00:00:00 80 07-JUL-2014 00:00:00 87 07-JUL-2014 00:00:00 64 07-JUL-2014 00:00:00 49 07-JUL-2014 00:00:00 50 07-JUL-2014 00:00:00 74 07-JUL-2014 00:00:00 95 07-JUL-2014 00:00:00 56 07-JUL-2014 00:00:00 40 07-JUL-2014 00:00:00 77 07-JUL-2014 00:00:00 58 ...
ALTER SESSION SET "_optimizer_aggr_groupby_elim" = FALSE; select trunc( sec ) dt, sum( sec_count ) from ( select created as sec, count(*) as sec_count from all_objects group by created ) group by trunc( sec ) order by 1; DT SUM(SEC_COUNT) 07-JUL-2014 00:00:00 89359 08-AUG-2016 00:00:00 4 09-AUG-2016 00:00:00 55 10-AUG-2016 00:00:00 2 11-AUG-2016 00:00:00 4 12-AUG-2016 00:00:00 2 15-AUG-2016 00:00:00 3 17-AUG-2016 00:00:00 1 18-AUG-2016 00:00:00 2 ...
The Oracle documentation contains a complete SQL reference.