I'm having an awful time trying to design a report. I need a historical report with 2 databases, dagent and haglog. I have 2 queries. One for data, the second for totals. Am having trouble with the "Where". For SELECT I have:
dagent.LOGID
dagent.LOGID
sum(dagent.TI_STAFFTIME)
dagent.sum(TOTAL_I_ACDTIME)
sum(dagent.I_RINGTIME)
dagent.sum(EXT_IN_TIME)
dagent.sum(EXT_OUT_TIME)
sum(dagent.TI_AVAILTIME)
sum(dagent.TI_AUXTIME)
dagent.sum(TOTAL_ACDCALLS)
dagent.sum(EXT_CALL_IN)
dagent.sum(EXT_CALL_OUT)
sum(dagent.TI_AUXTIME2)
sum(haglog.LOGIN)
sum(haglog.LOGOUT)
WHERE
ROW_DATE = [Date:] and ACD=$acd and LOGID in (select value from agroups where acd_no=$acd and item_name=[Agent Group:]) GROUP BY 1,2 ORDER BY dagent.LOGID, dagent.LOGID
Get the following error:
Group by 1, 2 **ERROR** order by dagent.LOGID,dagent.LOGID
dagent.LOGID
dagent.LOGID
sum(dagent.TI_STAFFTIME)
dagent.sum(TOTAL_I_ACDTIME)
sum(dagent.I_RINGTIME)
dagent.sum(EXT_IN_TIME)
dagent.sum(EXT_OUT_TIME)
sum(dagent.TI_AVAILTIME)
sum(dagent.TI_AUXTIME)
dagent.sum(TOTAL_ACDCALLS)
dagent.sum(EXT_CALL_IN)
dagent.sum(EXT_CALL_OUT)
sum(dagent.TI_AUXTIME2)
sum(haglog.LOGIN)
sum(haglog.LOGOUT)
WHERE
ROW_DATE = [Date:] and ACD=$acd and LOGID in (select value from agroups where acd_no=$acd and item_name=[Agent Group:]) GROUP BY 1,2 ORDER BY dagent.LOGID, dagent.LOGID
Get the following error:
Group by 1, 2 **ERROR** order by dagent.LOGID,dagent.LOGID