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!

Groupong on a count(*)

698571Apr 28 2009 — edited Apr 28 2009
I am trying to compile a query that will group on users giving a total count of jobs logged for current day.

ALTER SESSION set NLS_DATE_FORMAT = 'dd-Mon-yyyy';

SELECT ji.assignee
,to_char(ji.created, 'dd-Mon-yyyy') AS "Date Created"
,sum(count(3) )
FROM jiraissue ji, issuestatus js
WHERE created BETWEEN to_date(sysdate, 'dd-Mon-yy') AND to_date(sysdate, 'dd-Mon-yy')+1
AND ji.ISSUESTATUS = js.ID
AND js.ID NOT IN('4', '6', '5')
GROUP BY ji.assignee, ji.created
ORDER BY ji.created desc

What I woul like to see is

assignee | Created | Count
User1 | Date | 3
User3 | Date | 4

What I actually see is a seperate row for each user with 1

Thaks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2009
Added on Apr 28 2009
4 comments
406 views