Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- sql_texts.[HashSQL] AS "SQL",
- top_queries.[Total CPU Used] AS "CPU",
- top_queries.[Execution Count] AS "Execution Count"
- FROM
- (
- SELECT
- [HashSQLMD5] AS "HashSQLMD5",
- SUM([Total CPU Used]) AS "Total CPU Used",
- SUM([Execution Count]) AS "Execution Count"
- FROM #top_queries_04
- GROUP BY [HashSQLMD5]
- ) top_queries
- INNER JOIN (SELECT DISTINCT [HashSQL], [HashSQLMD5] FROM #top_queries_04) sql_texts
- ON sql_texts.[HashSQLMD5] = top_queries.HashSQLMD5
- ORDER BY top_queries.[Total CPU Used] DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement