This is what i currently have...but not what i am looking for...
CODE
select creation_date,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'01', 1,0)) JAN,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'02', 1,0)) FEB,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'03', 1,0)) MAR,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'04', 1,0)) APR,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'05', 1,0)) MAY,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'06', 1,0)) JUN,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'07', 1,0)) JUL,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'08', 1,0)) AUG,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'09', 1,0)) SEP,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'10', 1,0)) OCT,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'11', 1,0)) NOV,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'12', 1,0)) DEC,
count(*) TOTAL
from applsys.fnd_user
where creation_date > to_date('01/01/2010','MM-DD-YYYY')
GROUP BY creation_date
order by 1;
/CODE
I need the amount of users added to be displayed per month..together with a total...
output similar to this:
JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC TOTAL
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
4 0 1 0 0 0 0 0 0 0 0 0 5
0 3 0 0 0 0 0 0 0 0 0 0 3
TOTAL 4 3 1 0 0 0 0 0 0 0 0 0 8
Here is what the columns and data looks like:
COLUMNS:
"USER_ID","USER_NAME", "LAST_UPDATE_DATE", "LAST_UPDATED_BY", "CREATION_DATE", "CREATED_BY","LAST_UPDATE_LOGIN","SESSION_NUMBER","START_DATE","END_DATE","DESCRIPTION",
DATA:
2289, CECILIA.BUTHELEZI@MACBRIGHTBAR.CO.ZA, 3/24/2010 12:37:23 PM, 2289, 1/18/2010 12:22:49 PM, 1295, 4975366, 24, 1/18/2010, ,Cecilia Buthelezi,4/6/2010 8:46:36 AM,3/24/2010 12:37:23 PM
Need help with the script please!
CODE
select creation_date,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'01', 1,0)) JAN,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'02', 1,0)) FEB,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'03', 1,0)) MAR,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'04', 1,0)) APR,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'05', 1,0)) MAY,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'06', 1,0)) JUN,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'07', 1,0)) JUL,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'08', 1,0)) AUG,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'09', 1,0)) SEP,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'10', 1,0)) OCT,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'11', 1,0)) NOV,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'12', 1,0)) DEC,
count(*) TOTAL
from applsys.fnd_user
where creation_date > to_date('01/01/2010','MM-DD-YYYY')
GROUP BY creation_date
order by 1;
/CODE
I need the amount of users added to be displayed per month..together with a total...
output similar to this:
JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC TOTAL
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
4 0 1 0 0 0 0 0 0 0 0 0 5
0 3 0 0 0 0 0 0 0 0 0 0 3
TOTAL 4 3 1 0 0 0 0 0 0 0 0 0 8
Here is what the columns and data looks like:
COLUMNS:
"USER_ID","USER_NAME", "LAST_UPDATE_DATE", "LAST_UPDATED_BY", "CREATION_DATE", "CREATED_BY","LAST_UPDATE_LOGIN","SESSION_NUMBER","START_DATE","END_DATE","DESCRIPTION",
DATA:
2289, CECILIA.BUTHELEZI@MACBRIGHTBAR.CO.ZA, 3/24/2010 12:37:23 PM, 2289, 1/18/2010 12:22:49 PM, 1295, 4975366, 24, 1/18/2010, ,Cecilia Buthelezi,4/6/2010 8:46:36 AM,3/24/2010 12:37:23 PM
Need help with the script please!