User-1188570427 posted
Hello,
I am trying to find out all users that have 2 different departments in their profile in my web application.
Basically we have a User Id and then Department column. We have their main profile and then we have a history table where their values have changed as their accounts have been updated. Is there a query out there that can give me all users where
they have more than 1 different Department from the history table?
Here is an example
User ID = Department
1 = SALES
1 = IT
1 = SUPPORT
2 = SALES
2 = SALES
2 = SALES
3 = IT
3 = IT
3 = SALES
So the query should pull back user ID 1 and 3. User ID 1 has Sales, IT, and Support as their departments (they were moved a lot!). User ID 3 has IT and Sales,
Thanks.