long running queries
I want to write a query which could provide the top 25 queries which are taking long time based on input parameter(day/month). If i input the day, it should give the particular day related top10 queries taking lnog time. if i query the month, top 10 queries which have taken long time, in that particular month.
I have build the query with the following fields
1. Queryname, infoprovider name, date/time, Timetaken
and i have taken the condition on time taken, TOP N.
Now the output is as follows
Query InfoproviderName date time
Q0010 xxxxx 01.01.2008 13567