Created
August 22, 2011 19:41
-
-
Save adamstrickland/1163315 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use enterprise | |
go | |
with events (exceptionInfo, eventMessageDate) as ( | |
select top 10000 | |
M.exceptionInfo, M.eventMessageDate | |
from serviceEvent E | |
inner join serviceEventMessage M on E.eventId = M.eventId | |
where username = 'john.mcgilberry' | |
--where eventMessageDate >= '8/15/2011' | |
) | |
select top 100 | |
Q.exceptionInfo as Trace, | |
MAX(E.eventMessageDate) as [Timestamp] | |
from (select distinct exceptionInfo from events) Q | |
inner join events E on Q.exceptionInfo = E.exceptionInfo | |
group by Q.exceptionInfo | |
order by 2 desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment