something like this should do...
select UserName, sum(Received_Count) as Received, sum(Sent_Count) as Sent
where Date between '20030701' and '20030702'
group by UserName
RAC v2.2 & QALite!
"dtong101" <dtong101hotmail.com> wrote in message
news:0d6d01c344ce$ed943250$a001280aphx.gbl...> Hi, Any feedbacks are appreciated.
> I have to produce a summary report from one table. The
> fields are UserName, Date, Received_Count, Sent_Count.
> The record is unique when UserName and Date are
> I need to produce a summary report that list each UserName
> with summarized Received_Count and Sent_Count with a range
> of Date.
> Sample records:
> Joe 2003-01-07 192 30
> Joe 2003-02-07 121 45
> Mary 2003-01-07 100 10
> Mary 2003-02-07 200 99
> For the date range of 2003-01-07 to 2003-02-07
> Joe 313 75
> Mary 300 99