cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rizatt
Engaged Sweeper
HI,

I have tried my hand at writing a report. My objective was to get a report that shows how many tickets were created in a month and how many tickets were closed that month and have it group by type. I have 4 types of tickets in my system. Here is what I wrote and it doesn't address the type piece yet nor does it actually count the closed tickets correctly.

Select Top 1000000 DatePart(yyyy, htblticket.date) As Year,
DatePart(mm, htblticket.date) As Month,
Count(htblticket.ticketid) As TicketsCreated,
Count(htblticketstates.statename) As Closed
From htblticket
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Where htblticket.spam <> 'True'
Group By DatePart(yyyy, htblticket.date),
DatePart(mm, htblticket.date)
Order By Year Desc,
Month Desc

Any help would be appreciated.
1 REPLY 1
rizatt
Engaged Sweeper
Ok so I found a built in ticket report called 'Helpdesk Count of Tickets per Type and Month' How would I modify it so that the count variable is only referencing each ticket type and not each type compared to the whole month?