SQL Query - List most used report
Posted on 2014-07-29
I have a table structure like this:
ReportLogID, UserID, ReportID, ReportName, Viewed
The table stores which users have run which reports in our system.
I would like to run a SQL query that lists the reports (grouped by ReportID) and shows me and the number of times it has been run.
I would also like to choose the start and end date that I want to run the query for (this is the Viewed field).
I can do this in Crystal Reports (where I am comfortable!), but I am not sure what to do in SQL.
Any hep would be great.