Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQL query to compare historical data

JackRFeb 13 2018 — edited Feb 14 2018

Database: Oracle 12c

RAC: 2 nodes

OS: Linux 7

I have been saving off dba_segment information in a db_user_growth table for past two years.

I need your help write a SQL query that shows month to month data to compare and figure out the increase/decrease in data.

I will to analyze 35 months of data, so it would be helpful.

any suggestion or help writing a SQL query to figure out growth month by month and users.

For example:

  

Total GB Total GB Total GB Total GB Total GB
Owner

01/2016

02/2016 03/2016 04/201605/2016
JSMITH    2,860,576     3,860,576     5,860,576     7,560,576     7,567,845
PRITTER    1,664,811     2,664,805     3,664,811     3,264,811     4,064,811
DKUNZ  24,658,905   26,658,905   29,658,905   30,958,905   34,358,905
APETERSON         18,864          18,864          20,864          12,864        127,864
Total  29,203,156   33,203,150   39,205,156   41,797,156

  46,119,425

Thank you for all your help.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 14 2018
Added on Feb 13 2018
6 comments
606 views