• The query has no sense at all! I urge everyone not to use it.

    This join based on spid is simply wrong

    from #cpu2 c2 join #cpu1 c1 on c2.spid = c1.spid join master.dbo.sysprocesses sp with (nolock) on sp.spid = c2.spid


    Alex Suprun