I have a query that I am trying to group that I am not getting the results that I need in terms of it grouping them here is the query:
SELECT c.login, count(cc.case_id) SESSION_ID, SITE_NAME, Manager,
(Select CONCAT(WEEK(c.Comm_date_UTC))
from communications
group by 'week')
from case_details cd
join case_communications cc on cd.case_id=cc.case_id
join communications c on cc.comm_id=c.comm_id
where CONVERT_TZ(cc.Creation_DATE,'+00:00','+10:00')
BETWEEN DATE('2013-1-1') AND CURRENT_DATE ( )
Group by c.login
limit 100;
So what this is doing is giving me the following:
So the grouping by the login is working, but not buy the week, what I wanted to see is:
Note that its grouped by the week and login now, this is what I am trying to get
Any help?