This custom query returns wait statistics by database for a given SQL Server instance. You can adjust the start and end dates, specify the instance ID, and optionally filter by a list of databases.
Notes:
The query pulls detailed, second-by-second data from the CONSW
table, which is limited by default to the most recent 30 days.
If you run the query while logged in as the DPA repository owner account, remove the ignite.
schema prefix from all table references.