Date Query

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
 
C

Clifford Bass

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top