Good Day
Just wanted to ask for any help on how could I count a record depending on the value of the two column. Example below table i need to count the productivity of the agent for march 1 for each telno and for march 2 for each number.
the rule is 1 productivity per telno per day. Even they encoded many data for same telno still it count 1.
SQL = SELECT ACTION_DATE, COUNT(DISTINCT ACTION_RECNO) FROM WEB_ACTIONDETAI LSDONE WHERE ACTION_USER like '%" & sagent & "%' AND ACTION_DATE BETWEEN #" & fdate & "# and #" & tdate & "# GROUP BY ACTION_DATE;"
telno date user
111 1-Mar agent 1
222 1-Mar agent 1
333 1-Mar agent 1
111 1-Mar agent 1
333 1-Mar agent 1
222 2-Mar agent 1
444 2-Mar agent 1
444 2-Mar agent 1
111 2-Mar agent 1
333 2-Mar agent 1
the result should be
march 1
agent - 3
march 2
agent - 4
thank you in advance
RJ
Just wanted to ask for any help on how could I count a record depending on the value of the two column. Example below table i need to count the productivity of the agent for march 1 for each telno and for march 2 for each number.
the rule is 1 productivity per telno per day. Even they encoded many data for same telno still it count 1.
SQL = SELECT ACTION_DATE, COUNT(DISTINCT ACTION_RECNO) FROM WEB_ACTIONDETAI LSDONE WHERE ACTION_USER like '%" & sagent & "%' AND ACTION_DATE BETWEEN #" & fdate & "# and #" & tdate & "# GROUP BY ACTION_DATE;"
telno date user
111 1-Mar agent 1
222 1-Mar agent 1
333 1-Mar agent 1
111 1-Mar agent 1
333 1-Mar agent 1
222 2-Mar agent 1
444 2-Mar agent 1
444 2-Mar agent 1
111 2-Mar agent 1
333 2-Mar agent 1
the result should be
march 1
agent - 3
march 2
agent - 4
thank you in advance
RJ
Comment