Date Query

  • Thread starter Thread starter navin
  • Start date Start date
N

navin

Hi,

I have a table which contains data on tickets assigned to agents
along with the time the tickets were created, process and status of
the ticket (Open, In Process, Close). I need to create a query which
should output the count of ticket numbers which will be completing 24
hrs of TAT in next 2 hrs.

Data in my table:

Ticket# Process Status Created Date
123 Order Change Open 1/21/2008 20:00
345 Order Change Open 1/22/2008 20:41
435 Order Change Open 1/22/2008 20:00
654 Order Change Open 1/22/2008 20:41


I need output look like below:
Open
Order Change 2

Please let me know how can i write a query to achieve the above
output.

Thanks in advance for help.
Navin
 
Hi Navin,

Not knowing what TAT is (a description would have been helpful); try:

select Process, Count(*) as Open
from YourTableName
where DateDiff("n", [Created Date], Now()) between 1320 and 1440
group by Process;

Clifford Bass
 
Back
Top