First of all, Excuse me as you may have seen that question before, but I've already tried the solutions around here. but it's not matching with my need. I have two tables. one of them for sales section agents, other for technical support agents. I need to SUM the values of Received calls in both sections per day.
My Table Structure and sample data:
example : date column will remain as is, Received column = sales.received + tech.received , sales.answered + tech.answered I came through this :
SELECT
(SELECT SUM(`Received_Calls`) FROM sales) + (SELECT SUM(`Received_Calls`) FROM tech
) FROM DUAL
But it's showing the total only.. without showing the daily calculation for every day.
expected outcome:
---------------------------------------------
Date | Received | Answered | Abandoned
---------------------------------------------
|2014-11-14| 8406 | 8363 | 43
|2014-11-15| 9909 | 9792 | 116
---------------------------------------------
and there is no certain dates available on a table without the other, every day's date is available on both tables with no exceptions.
any help? Thanks :)


sum()being an aggregate function collapses the resultset into a single record in the absence of a group by. If you have 1 record per day, then you just need to add the columns to each other, no need for thesum().