07-17-2019 10:29 PM
08-22-2019 04:53 AM
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
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
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
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now