Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
colby
Starting Member
6 Posts |
Posted - 2000-11-16 : 13:12:20
|
| how can i count the status type and for every 7 days it will create another recordSelect count(t.ticket_id) ,t.ticket_request_d, s.status_type_name ,c.company_name ,c.loc_name ,datediff(ww,"1/1/2000", "11/16/2000") "time"From Ticket t JOIN Requestor r ON (t.req_id = r.req_id) left outer Join Company c ON (c.company_id = r.company_id) Join Status_type s ON (t.status_type_id = s.status_type_id) Join Analyst a ON(t.assigned_to_id = a.analyst_id)Where a.analyst_id = 3 and (ticket_request_d between '01/01/2000 ' and '11/16/2000 ') GROUP BY s.status_type_name,c.company_name ,c.loc_name, ticket_request_d |
|
|
|
|
|