Hello,
I have a select query that extract data from a table - example attached. What I need to do is:
- if I pick multiple days (as in example), aggregate the time frames into one row; example all 7:00 am should show once and the rest of the data fields summed as well.
- In the example, I should see something like that:
10025 31-Oct-09 7:00:00 AM 1 0
A new calculated date index can be shown there as well to represent the combined days.
I hope to have explained this issue the best I can. If more is needed, please let me know.
Thanks in advance.
Hi Ibernadel,
Do you mean something like this:
or this?Code:SELECT AppID, TimeStamp, Time, Sum(CallsOffered) AS SumOfCallsOffered, Sum(ASA) AS SumOfASA FROM tblCalls GROUP BY AppID, TimeStamp, Time;
Your example doesn't show the same kind of sum these queries will extract.Code:SELECT Time, Sum(CallsOffered) AS SumOfCallsOffered, Sum(ASA) AS SumOfASA FROM tblCalls GROUP BY Time;
Cheers,
Docendo discimus.
Please consider:
- Thanking those who helped you. Click the reputation icon
in the contributor's post and add Reputation.
- Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Hi ConneXionLost,
Thank you for your response. I would want the query to sum the SAS and CallsOffered and group them by Time; which I sense the second example will do.
I will try that and report. In the meantime, if you have any other suggestion, please let me know.
Thank You!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks