function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Katherine RoweKatherine Rowe 

Query to find all personal reports based on user's role

I understand we can now use Developer Console to find and delete reports from the users' personal report folders. I need help writing that query. At least to view the reports, and then later to delete.

I want it to show me report id, report name, user name, user role for all users where role contains "abc". And then I would like to do the same query, but for users that are inactive instead of based on their role.

The example floating around in the documentation is below, but not sure how to incorporate the changes I want:
SELECT Id FROM Report USING SCOPE allPrivate WHERE LastRunDate < LAST_N_DAYS:365