I'm trying to determine how many unique values from one column can be grouped by values in another column.
There are many columns in my sheet, but the ones I'm interested in are: 'department' and 'user'
How the data is that for these two columns, there are repeat users with the same department.
SELECT department, COUNT(DISTINCT user)
GROUP BY department, user
(SELECT DISTINCT User from Sheet1)
As mentioned in the comments, you just need to remove users from the group by.
SELECT department, COUNT(DISTINCT [user]) as CT FROM Sheet1 GROUP BY department
SELECT department, count([user]) FROM (SELECT DISTINCT department, [user] from Sheet1) as x GROUP BY department