Notification

Icon
Error

Top 10 users submitting tickets - Top 10 users submitting tickets by month and year

Posted: Wednesday, July 17, 2019 9:29:44 PM(UTC)
LGuth

LGuth

Member Original PosterPosts: 5
0
Like
I would like to have a report showing the top 10 users that have submitted tickets by month and year.
I'm not real savvy on writing code.
Could someone help me?

Linda Guth
====

Maybe this report below that shows the top Ticket Types can be modified to show User Names instead?

Select Top 1000000 DatePart(yyyy, htblticket.date) As Year,
DatePart(mm, htblticket.date) As Month,
'../helpdesk/icons/' + htbltickettypes.icon As icon,
htbltickettypes.typename As Type,
Count(htblticket.ticketid) As TicketCount,
Cast((Count(htblticket.ticketid) / Cast(TicketCount.Amount As decimal) *
100) As decimal(10,2)) As [Type%]
From htblticket
Inner Join htbltickettypes On htbltickettypes.tickettypeid =
htblticket.tickettypeid
Inner Join (Select DatePart(yyyy, htblticket.date) As Year,
DatePart(mm, htblticket.date) As Month,
Count(htblticket.ticketid) As Amount
From htblticket
Where htblticket.spam <> 'True'
Group By DatePart(yyyy, htblticket.date),
DatePart(mm, htblticket.date)) As TicketCount On TicketCount.Year =
DatePart(yyyy, htblticket.date) And TicketCount.Month = DatePart(mm,
htblticket.date)
ChuckSchurman
#1ChuckSchurman Member Posts: 1  
posted: 8/22/2019 3:53:21 AM(UTC)
Well, what I have is not top 10, it's count by month, 3 month and year, but it's a starting point for ya.



per year
Quote:

Select Top 1000000 htblusers.name As Name,
htblusers.username,
Count(htblticket.ticketid) As TicketCount
From htblticket
Inner Join htblusers On htblusers.userid = htblticket.fromuserid
Where htblticket.date > GetDate() - 365
Group By htblusers.name,
htblusers.username,
htblusers.userdomain,
htblticket.fromuserid
Order By Name

Per 3 Month
Quote:

Select Top 1000000 htblusers.name As Name,
htblusers.username,
Count(htblticket.ticketid) As TicketCount
From htblticket
Inner Join htblusers On htblusers.userid = htblticket.fromuserid
Where htblticket.date > GetDate() - 90
Group By htblusers.name,
htblusers.username,
htblusers.userdomain,
htblticket.fromuserid
Order By Name

Per current month
Quote:

Select Top 1000000 htblusers.name As Name,
htblusers.username,
Count(htblticket.ticketid) As TicketCount
From htblticket
Inner Join htblusers On htblusers.userid = htblticket.fromuserid
Where DatePart(mm, htblticket.date) = DatePart(mm, GetDate()) And
DatePart(yyyy, htblticket.date) = DatePart(yyyy, GetDate()) And
htblticket.spam <> 'True'
Group By htblusers.name,
htblusers.username,
htblusers.userdomain,
htblticket.fromuserid
Order By Name

Active Discussions

Lansweeper Vmware Vcenter and Hosts not scanning
by  pkamacho   Go to last post Go to first unread
Last post: Today at 8:33:17 PM(UTC)
Lansweeper Helpdesk Ticket "On-Hold"
by  Chris1052  
Go to last post Go to first unread
Last post: Today at 7:44:01 PM(UTC)
Lansweeper SNMPv3 Scanning of Cisco Devices
by  Bruce.B   Go to last post Go to first unread
Last post: Today at 7:40:08 PM(UTC)
Lansweeper Object reference not set to an instance of an object
by  Bruce.B  
Go to last post Go to first unread
Last post: Today at 6:33:18 PM(UTC)
Lansweeper New Exchange server feature scanning
by  Thomas D.   Go to last post Go to first unread
Last post: Today at 5:00:51 PM(UTC)
Lansweeper AD Users and email
by  CyberCitizen  
Go to last post Go to first unread
Last post: Today at 12:40:54 AM(UTC)
Lansweeper Distrubution Center workstation Map
by  CGIMana79   Go to last post Go to first unread
Last post: Yesterday at 6:00:44 PM(UTC)
Lansweeper Starting ticket # for helpdesk
by  AEM IT  
Go to last post Go to first unread
Last post: Yesterday at 5:17:22 PM(UTC)