Thank you that is what I wanted.
The only problem is that I want to filter the results because it showed some suers that I didnt expect to show up. I know I would have to do this with the SQL
To try and fix this I will filter the results that show by department so I went into the active directory and saw that each department is in an Accounts category so I tried to do what is below but it does not work because I most likely have the wrong syntax for choosing a department
WHERE objectAccounts='DepartmentName'
and then I would like it to only show active user accounts but im not sure how I would reference that either.